@@ -0,0 +1,45 @@ | |||
--- | |||
driver: | |||
name: vagrant | |||
platforms: | |||
- name: debian-jessie64 | |||
driver_config: | |||
box: ssplatt/salt-deb-8 | |||
provisioner: | |||
name: salt_solo | |||
salt_version: 2015.8.8 | |||
is_file_root: true | |||
grains: | |||
os_family: Debian | |||
suites: | |||
- name: repositories | |||
provisioner: | |||
state_top: | |||
base: | |||
'*': | |||
- apt.repositories | |||
- apt.update | |||
pillars: | |||
top.sls: | |||
base: | |||
'*': | |||
- apt | |||
apt.sls: | |||
apt: | |||
remove_sources_list: true | |||
clean_sources_list_d: true | |||
repositories: | |||
debian-jessie-source: | |||
distro: jessie | |||
url: http://httpredir.debian.org/debian | |||
type: [source] | |||
comps: [main, contrib, non-free] | |||
dropbox-repo: | |||
distro: jessie | |||
url: http://linux.dropbox.com/debian | |||
arch: [i386, amd64] | |||
keyid: 1C61A2656FB57B7E4DE0F4C1FC918B335044912E | |||
keyserver: pgp.mit.edu |
@@ -0,0 +1,35 @@ | |||
require 'spec_helper' | |||
describe 'apt.repositories' do | |||
describe package('debian-archive-keyring') do | |||
it { should be_installed } | |||
end | |||
describe file('/etc/apt/sources.list') do | |||
it { should_not exist } | |||
end | |||
describe file('/etc/apt/sources.list.d') do | |||
it { should be_directory } | |||
it { should be_mode 755 } | |||
it { should be_owned_by 'root' } | |||
it { should be_grouped_into 'root' } | |||
end | |||
describe file('/etc/apt/sources.list.d/debian-jessie-source.list') do | |||
it { should exist } | |||
it { should be_mode 644 } | |||
it { should be_owned_by 'root' } | |||
it { should be_grouped_into 'root' } | |||
its(:content) { should match('deb-src http://httpredir.debian.org/debian jessie contrib non-free main') } | |||
end | |||
describe file('/etc/apt/sources.list.d/dropbox-repo.list') do | |||
it { should exist } | |||
it { should be_mode 644 } | |||
it { should be_owned_by 'root' } | |||
it { should be_grouped_into 'root' } | |||
its(:content) { should match(%r{deb \[arch=i386,amd64\] http://linux.dropbox.com/debian jessie main}) } | |||
end | |||
end |
@@ -0,0 +1,9 @@ | |||
require "serverspec" | |||
require "pathname" | |||
# Set backend type | |||
set :backend, :exec | |||
RSpec.configure do |c| | |||
c.path = "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" | |||
end |