Commit graph

18 commits

Author SHA1 Message Date
Vasundhara Jagdale
326b6bfd47
CFINSPEC-533: Fix undefined method 'summary' for Gem::SourceFetchProblem (NoMethodError) when airgapped (#6337)
* This fixes the undefined method 'summary' for #<Gem::SourceFetchProblem:0x000000000139dc70> (NoMethodError) while invoking any inspec command if the custom plugin is installed and if inspec commands are run in an air gap environment.
This fix removes an earlier call for getting gem specification from rubygems.org which is the cause for above error and replaces it with fetching the summary from a locally saved gemspec file. This will work in both airgap and non-airgap environments.

Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>

* Adds test for reading description from local gemspec file.

Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>

Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
2023-01-03 10:01:49 -05:00
Clinton Wolfe
d86112bad7 Intercept width warning message for plugin list
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
2022-03-23 14:37:59 -04:00
Ryan Davis
947365719a Fix artifact-habitat testing for inspec.
Needed a fallback on `ENV["project_root"]` not being defined.

Signed-off-by: Ryan Davis <zenspider@chef.io>
2020-02-10 18:34:00 -08:00
Miah Johnson
c993f91ca6 rubocop is on the beat
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-11-22 12:48:56 -08:00
Miah Johnson
45070c15c0 Fixup tests
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-11-21 17:01:10 -08:00
Miah Johnson
6510679e6a dont clobber
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-11-09 13:38:00 -08:00
Miah Johnson
b6b6afb29d dry up other tests
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-11-09 13:36:15 -08:00
Miah Johnson
96d7eab62f dry up exists tests
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-11-09 13:35:17 -08:00
Miah Johnson
6f829c2d27 drop leading /bin
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-11-07 17:13:49 -08:00
Miah Johnson
71e72af079 Change flunk to skip. drop parallelize me until multiple tests
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-11-07 16:19:19 -08:00
Miah Johnson
2a2dd29e5b I moved up open3, so lets delete these
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-11-07 15:55:50 -08:00
Miah Johnson
ca1416fb0a Add some very basic tests. Several of which outright flunk!
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-11-07 15:42:48 -08:00
Miah Johnson
6ad21441e4 Move exist checks to own test. Use open3
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-11-07 15:34:21 -08:00
Miah Johnson
13a1c30ba6 Corret build scripts
correct path to hab artifact
Rather than throwing, lets try to install the version
Make sure hab is in the path
we use -b on windows. lets be consistent
export project_root too
picardface
fix regex
execute rake _through_ habitat
make test vrooom
test presence of inspec
strip out clixml bs
... no which on bk.
full path to which
export PATH
test exist on linux/windows

Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-11-07 10:09:35 -08:00
Miah Johnson
6e88b3ceb9 Fix rubocop warnings
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-10-16 21:01:19 -07:00
Miah Johnson
46e7b00add Fix Rakefile and wtf
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-10-16 21:01:19 -07:00
Miah Johnson
9543ed8ecc Add a Rakefile as our main Rakefile also requires 'train'
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-10-16 21:01:19 -07:00
Miah Johnson
4544ff30aa Add a very simple test for Windows Habitat builds.
Signed-off-by: Miah Johnson <miah@chia-pet.org>
2019-10-16 21:01:19 -07:00