Skip to content

Commit

Permalink
Intercept width warning message for plugin list
Browse files Browse the repository at this point in the history
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
  • Loading branch information
clintoncwolfe committed Mar 23, 2022
1 parent 4f69156 commit d86112b
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions test/artifact/inspec_plugin_test.rb
@@ -1,7 +1,13 @@
require_relative "artifact_helper"

class TestInspecPlugin < ArtifactTest
def test_plugin_lsit
assert_artifact("plugin list")
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

0 comments on commit d86112b

Please sign in to comment.