From 8a51ae5f559d5918f37bc0b3fc19da7cc3c88045 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20B=C3=A9rtoli?= Date: Wed, 21 Oct 2020 16:40:48 -0300 Subject: [PATCH] test(npm): changed package to an existing one --- .../default/controls/npms_spec.rb.old | 52 ------------------- test/salt/pillar/debian.sls | 2 +- 2 files changed, 1 insertion(+), 53 deletions(-) delete mode 100644 test/integration/default/controls/npms_spec.rb.old diff --git a/test/integration/default/controls/npms_spec.rb.old b/test/integration/default/controls/npms_spec.rb.old deleted file mode 100644 index 3c33282..0000000 --- a/test/integration/default/controls/npms_spec.rb.old +++ /dev/null @@ -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 diff --git a/test/salt/pillar/debian.sls b/test/salt/pillar/debian.sls index ddb43b5..8c7998c 100644 --- a/test/salt/pillar/debian.sls +++ b/test/salt/pillar/debian.sls @@ -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