Skip to content
Snippets Groups Projects
Commit f706bdee authored by Marin Jankovski's avatar Marin Jankovski
Browse files

Add testkitchen and serverspec specs.

parent 5072e638
No related branches found
No related tags found
No related merge requests found
.kitchen/
.kitchen.local.yml
---
driver:
name: vagrant
provisioner:
name: chef_solo
platforms:
- name: ubuntu-12.04
- name: ubuntu-14.04
- name: ubuntu-16.04
- name: centos-7.2
- name: centos-6.4
suites:
- name: default
run_list:
- recipe[cookbook-gitlab-runner::default]
attributes:
cookbook-gitlab-runner:
global_config:
concurrent: 10
runners:
test1:
global:
name: test1
limit: 20
docker:
image: ruby:2.1
privileged: true
source "https://supermarket.chef.io"
 
cookbook 'apt'
cookbook 'yum'
metadata
DEPENDENCIES
apt
yum
cookbook-gitlab-runner
path: .
metadata: true
 
GRAPH
apt (3.0.0)
yum (3.10.0)
cookbook-gitlab-runner (0.1.0)
apt (>= 0.0.0)
yum (>= 0.0.0)
yum (3.11.0)
Loading
Loading
@@ -2,6 +2,7 @@ GEM
remote: https://rubygems.org/
specs:
addressable (2.4.0)
artifactory (2.3.2)
berkshelf (4.3.3)
addressable (~> 2.3, >= 2.3.4)
berkshelf-api-client (~> 2.0, >= 2.0.2)
Loading
Loading
@@ -50,6 +51,8 @@ GEM
hitimes (1.2.4)
httpclient (2.7.2)
json (1.8.3)
kitchen-vagrant (0.20.0)
test-kitchen (~> 1.4)
minitar (0.5.4)
mixlib-authentication (1.4.0)
mixlib-log
Loading
Loading
@@ -57,10 +60,18 @@ GEM
rspec-expectations (~> 3.2)
rspec-mocks (~> 3.2)
mixlib-config (2.2.1)
mixlib-install (1.0.12)
artifactory
mixlib-shellout
mixlib-versioning
mixlib-log (1.6.0)
mixlib-shellout (2.2.6)
mixlib-versioning (1.1.0)
molinillo (0.4.5)
multipart-post (2.0.0)
net-scp (1.2.1)
net-ssh (>= 2.6.5)
net-ssh (3.1.1)
nio4r (1.2.1)
octokit (4.3.0)
sawyer (~> 0.7.0, >= 0.5.3)
Loading
Loading
@@ -92,6 +103,7 @@ GEM
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.4.0)
rspec-support (3.4.1)
safe_yaml (1.0.4)
sawyer (0.7.0)
addressable (>= 2.3.5, < 2.5)
faraday (~> 0.8, < 0.10)
Loading
Loading
@@ -99,6 +111,13 @@ GEM
solve (2.0.3)
molinillo (~> 0.4.2)
semverse (~> 1.1)
test-kitchen (1.9.0)
mixlib-install (~> 1.0, >= 1.0.4)
mixlib-shellout (>= 1.2, < 3.0)
net-scp (~> 1.1)
net-ssh (>= 2.9, < 4.0)
safe_yaml (~> 1.0)
thor (~> 0.18)
thor (0.19.1)
timers (4.0.4)
hitimes
Loading
Loading
@@ -111,6 +130,8 @@ PLATFORMS
 
DEPENDENCIES
berkshelf
kitchen-vagrant
test-kitchen
 
BUNDLED WITH
1.11.2
.kitchen
Loading
Loading
@@ -5,6 +5,6 @@
# Copyright 2016, GitLab Inc.
#
 
include_recipe 'docker_install'
include_recipe 'runner_install'
include_recipe 'runner_configure'
include_recipe '::docker_install'
include_recipe '::runner_install'
include_recipe '::runner_configure'
require 'serverspec'
# Required by serverspec
set :backend, :exec
describe "Docker engine" do
describe package('docker-engine') do
it { should be_installed }
end
end
require 'serverspec'
# Required by serverspec
set :backend, :exec
describe "Docker machine" do
describe command('docker-machine --version') do
its(:stdout) { should match /docker-machine version 0.7.0/ }
end
end
require 'serverspec'
# Required by serverspec
set :backend, :exec
describe "GitLab runner" do
describe package('gitlab-ci-multi-runner') do
it { should be_installed }
end
describe file('/etc/gitlab-runner/config.toml') do
it { should be_file }
it { should be_owned_by 'root' }
it { should be_mode 600 }
end
describe file('/etc/gitlab-runner/config.toml') do
its(:content) { should match /concurrent = 10/ }
its(:content) { should match /[[runners]]/ }
its(:content) { should match /[runners.docker]/ }
its(:content) { should match /image = "ruby:2.1"/ }
its(:content) { should match /privileged = true/ }
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment