Code Review
/
puppet-modules
/
puppetlabs-apt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Convert to use apt::setting instead of file resources
[puppet-modules/puppetlabs-apt.git]
/
spec
/
defines
/
source_spec.rb
diff --git
a/spec/defines/source_spec.rb
b/spec/defines/source_spec.rb
index 3d8410f097bcb6cc907679d26a89105afb948500..ad986e96843b28ac50efe2138d634092908fa608 100644
(file)
--- a/
spec/defines/source_spec.rb
+++ b/
spec/defines/source_spec.rb
@@
-27,7
+27,7
@@
describe 'apt::source', :type => :define do
}
end
}
end
- it { is_expected.to contain_apt__setting('my_source').that_notifies('Exec[apt_update]').with({
+ it { is_expected.to contain_apt__setting('
list-
my_source').that_notifies('Exec[apt_update]').with({
'ensure' => 'present',
}).with_content(/# my_source\ndeb-src wheezy main\n/)
}
'ensure' => 'present',
}).with_content(/# my_source\ndeb-src wheezy main\n/)
}
@@
-58,19
+58,19
@@
describe 'apt::source', :type => :define do
}
end
}
end
- it { is_expected.to contain_apt__setting('my_source').that_notifies('Exec[apt_update]').with({
+ it { is_expected.to contain_apt__setting('
list-
my_source').that_notifies('Exec[apt_update]').with({
'ensure' => 'present',
}).with_content(/# foo\ndeb \[arch=x86_64 trusted=yes\] http:\/\/debian\.mirror\.iweb\.ca\/debian\/ sid testing\n/).without_content(/deb-src/)
}
'ensure' => 'present',
}).with_content(/# foo\ndeb \[arch=x86_64 trusted=yes\] http:\/\/debian\.mirror\.iweb\.ca\/debian\/ sid testing\n/).without_content(/deb-src/)
}
- it { is_expected.to contain_apt__pin('my_source').that_comes_before('Apt::Setting[my_source]').with({
+ it { is_expected.to contain_apt__pin('my_source').that_comes_before('Apt::Setting[
list-
my_source]').with({
'ensure' => 'present',
'priority' => '10',
'origin' => 'debian.mirror.iweb.ca',
})
}
'ensure' => 'present',
'priority' => '10',
'origin' => 'debian.mirror.iweb.ca',
})
}
- it { is_expected.to contain_apt__key("Add key: #{GPG_KEY_ID} from Apt::Source my_source").that_comes_before('Apt::Setting[my_source]').with({
+ it { is_expected.to contain_apt__key("Add key: #{GPG_KEY_ID} from Apt::Source my_source").that_comes_before('Apt::Setting[
list-
my_source]').with({
'ensure' => 'present',
'key' => GPG_KEY_ID,
'key_server' => 'pgp.mit.edu',
'ensure' => 'present',
'key' => GPG_KEY_ID,
'key_server' => 'pgp.mit.edu',
@@
-95,7
+95,7
@@
describe 'apt::source', :type => :define do
}
end
}
end
- it { is_expected.to contain_apt__setting('my_source').that_notifies('Exec[apt_update]').with({
+ it { is_expected.to contain_apt__setting('
list-
my_source').that_notifies('Exec[apt_update]').with({
'ensure' => 'present',
}).with_content(/# my_source\ndeb \[trusted=yes\] wheezy main\n/)
}
'ensure' => 'present',
}).with_content(/# my_source\ndeb \[trusted=yes\] wheezy main\n/)
}
@@
-117,7
+117,7
@@
describe 'apt::source', :type => :define do
}
end
}
end
- it { is_expected.to contain_apt__setting('my_source').that_notifies('Exec[apt_update]').with({
+ it { is_expected.to contain_apt__setting('
list-
my_source').that_notifies('Exec[apt_update]').with({
'ensure' => 'present',
}).with_content(/# my_source\ndeb-src \[arch=x86_64 \] wheezy main\n/)
}
'ensure' => 'present',
}).with_content(/# my_source\ndeb-src \[arch=x86_64 \] wheezy main\n/)
}
@@
-137,7
+137,7
@@
describe 'apt::source', :type => :define do
}
end
}
end
- it { is_expected.to contain_apt__setting('my_source').that_notifies('Exec[apt_update]').with({
+ it { is_expected.to contain_apt__setting('
list-
my_source').that_notifies('Exec[apt_update]').with({
'ensure' => 'absent'
})
}
'ensure' => 'absent'
})
}