2019-11-07 23:34:21 +00:00
|
|
|
require_relative "artifact_helper"
|
|
|
|
require "open3"
|
2019-09-18 23:52:34 +00:00
|
|
|
|
2019-11-07 23:34:21 +00:00
|
|
|
class TestInspecDetect < Minitest::Test
|
|
|
|
parallelize_me!
|
2019-11-06 22:31:47 +00:00
|
|
|
|
2019-09-18 23:52:34 +00:00
|
|
|
def test_detect
|
2019-11-07 23:34:21 +00:00
|
|
|
command = "/bin/inspec detect --no-color #{TEST_CLI_OPTS}"
|
|
|
|
stdout, stderr, status = Open3.capture3(command)
|
2019-09-18 23:52:34 +00:00
|
|
|
|
2019-11-07 23:34:21 +00:00
|
|
|
assert_empty stderr.sub(/#< CLIXML\n/, "")
|
|
|
|
assert_match(/Platform Details/, stdout)
|
|
|
|
assert status
|
2019-09-19 01:19:51 +00:00
|
|
|
end
|
2019-09-18 23:52:34 +00:00
|
|
|
end
|