mirror of
https://github.com/saltstack-formulas/packages-formula.git
synced 2025-04-16 17:50:24 +00:00
test(npm): changed package to an existing one
This commit is contained in:
parent
c9fe187e16
commit
8a51ae5f55
2 changed files with 1 additions and 53 deletions
|
@ -1,52 +0,0 @@
|
|||
## FIXME! inspec's npm resource fails to check correctly (sudo issues, path issues)
|
||||
## so I added some "poor man's checks" to ensure, at least, that npms are in place
|
||||
|
||||
npms_path = '/home/kitchen/npms'
|
||||
|
||||
wanted_npms = {
|
||||
'@davidodio/hello': '2.3.0',
|
||||
'hello-world-npm': '1.1.1',
|
||||
'sax': '1.2.4',
|
||||
'coffee-script': '1.0.1'
|
||||
}
|
||||
|
||||
### WANTED/REQUIRED
|
||||
control 'Wanted/Required npm packages' do
|
||||
title 'should be installed'
|
||||
desc '(only testing in the Debian platform, as the node-formula dependency is too specific)'
|
||||
|
||||
only_if do
|
||||
platform.name == 'debian'
|
||||
end
|
||||
|
||||
describe directory(npms_path) do
|
||||
it { should exist }
|
||||
its('owner') { should cmp 'kitchen' }
|
||||
its('group') { should cmp 'kitchen' }
|
||||
its('mode') { should cmp '0755' }
|
||||
end
|
||||
|
||||
wanted_npms.each do |p,v|
|
||||
describe directory("#{npms_path}/node_modules/#{p}") do
|
||||
it { should exist }
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
### UNWANTED
|
||||
control 'Unwanted npm packages' do
|
||||
title 'should be uninstalled'
|
||||
desc '(only testing in the Debian platform, as the node-formula dependency is too specific)'
|
||||
|
||||
only_if do
|
||||
platform.name == 'debian'
|
||||
end
|
||||
|
||||
%w{
|
||||
gist
|
||||
}.each do |p|
|
||||
describe npm(p) do
|
||||
it { should_not be_installed }
|
||||
end
|
||||
end
|
||||
end
|
|
@ -92,7 +92,7 @@ packages:
|
|||
# buffer-equal-constant-time@1.0.1
|
||||
# coffee-script
|
||||
# You need to quote the package if it starts with '@'
|
||||
- '@davidodio/hello@2.3.0'
|
||||
- '@low-systems/example@1.1.58'
|
||||
- hello-world-npm
|
||||
- sax
|
||||
- coffee-script@1.0.1
|
||||
|
|
Loading…
Add table
Reference in a new issue