forked from evolix/ansible-roles
apt-repositories: add some specs
This commit is contained in:
parent
5a5cf44870
commit
976b0836bb
|
@ -17,11 +17,19 @@ provisioner:
|
||||||
platforms:
|
platforms:
|
||||||
- name: debian-8
|
- name: debian-8
|
||||||
|
|
||||||
|
verifier:
|
||||||
|
name: serverspec
|
||||||
|
|
||||||
suites:
|
suites:
|
||||||
- name: default
|
- name: default
|
||||||
provisioner:
|
provisioner:
|
||||||
name: ansible_playbook
|
name: ansible_playbook
|
||||||
playbook: ./tests/test.yml
|
playbook: ./tests/test.yml
|
||||||
|
verifier:
|
||||||
|
patterns:
|
||||||
|
- apt-repositories/tests/spec/main_spec.rb
|
||||||
|
bundler_path: '/usr/local/bin'
|
||||||
|
rspec_path: '/usr/local/bin'
|
||||||
|
|
||||||
transport:
|
transport:
|
||||||
max_ssh_sessions: 6
|
max_ssh_sessions: 6
|
||||||
|
|
21
apt-repositories/tests/spec/main_spec.rb
Normal file
21
apt-repositories/tests/spec/main_spec.rb
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
require 'net/http'
|
||||||
|
require 'uri'
|
||||||
|
|
||||||
|
require 'serverspec'
|
||||||
|
set :backend, :exec
|
||||||
|
|
||||||
|
describe file("/etc/apt/sources.list.d/backports.list") do
|
||||||
|
it { should be_file }
|
||||||
|
end
|
||||||
|
|
||||||
|
describe file("/etc/apt/preferences.d/backports") do
|
||||||
|
it { should be_file }
|
||||||
|
end
|
||||||
|
|
||||||
|
describe command("grep 'main contrib non-free' /etc/apt/sources.list.d/backports.list") do
|
||||||
|
its(:exit_status) { should eq 0 }
|
||||||
|
end
|
||||||
|
|
||||||
|
describe command("grep 'main contrib non-free' /etc/apt/sources.list") do
|
||||||
|
its(:exit_status) { should eq 0 }
|
||||||
|
end
|
Loading…
Reference in a new issue