forked from evolix/ansible-roles
[WIP] add tests to etc-git
This commit is contained in:
parent
02625c1ecc
commit
d5a18a4456
35
etc-git/.kitchen.yml
Normal file
35
etc-git/.kitchen.yml
Normal 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
|
13
etc-git/tests/spec/etc-git_spec.rb
Normal file
13
etc-git/tests/spec/etc-git_spec.rb
Normal 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
4
etc-git/tests/test.yml
Normal file
|
@ -0,0 +1,4 @@
|
|||
---
|
||||
- hosts: test-kitchen
|
||||
roles:
|
||||
- role: etc-git
|
Loading…
Reference in a new issue