[WIP] add tests to etc-git

This commit is contained in:
Jérémy Lecour 2017-04-19 17:42:03 +02:00 committed by Jérémy Lecour
parent 02625c1ecc
commit d5a18a4456
3 changed files with 52 additions and 0 deletions

35
etc-git/.kitchen.yml Normal file
View File

@ -0,0 +1,35 @@
---
driver:
name: docker
privileged: true
use_sudo: false
provisioner:
name: ansible_playbook
hosts: test-kitchen
roles_path: ../
ansible_verbose: true
require_ansible_source: true
install_source_rev: "stable-2.2.1.0"
require_chef_for_busser: false
idempotency_test: true
platforms:
- name: debian-8
verifier:
name: serverspec
suites:
- name: default
provisioner:
name: ansible_playbook
playbook: ./tests/test.yml
verifier:
patterns:
- etc-git/tests/spec/etc-git_spec.rb
bundler_path: '/usr/local/bin'
rspec_path: '/usr/local/bin'
transport:
max_ssh_sessions: 6

View File

@ -0,0 +1,13 @@
require 'net/http'
require 'uri'
require 'serverspec'
set :backend, :exec
describe file('/etc/.git/config') do
it { should be_file }
end
describe command("cd /git && git status --porcelain") do
its(:stdout) { should be_empty }
end

4
etc-git/tests/test.yml Normal file
View File

@ -0,0 +1,4 @@
---
- hosts: test-kitchen
roles:
- role: etc-git