mirror of
https://github.com/inspec/inspec
synced 2024-11-14 00:47:10 +00:00
35f8c4829f
* 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. * Adds test for reading description from local gemspec file. Signed-off-by: Vasu1105 <vasundhara.jagdale@chef.io>
12 lines
474 B
Ruby
12 lines
474 B
Ruby
require_relative "artifact_helper"
|
|
|
|
class TestInspecPlugin < ArtifactTest
|
|
def test_plugin_list
|
|
# This one is custom because it emits a special warning to stderr
|
|
inspec_command = "plugin list"
|
|
stdout, stderr, status = run_cmd "inspec #{inspec_command} #{TEST_CLI_OPTS}"
|
|
assert_empty stderr.sub(/#< CLIXML\n/, "").sub(/The table size exceeds the currently set width\.Defaulting to vertical orientation\.\n/, "")
|
|
assert stdout
|
|
assert status
|
|
end
|
|
end
|