Add functional test for inspec check with runtime constraint

Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
This commit is contained in:
Clinton Wolfe 2019-08-26 23:19:18 -04:00
parent 714dc26006
commit c6f33b3526

View file

@ -106,4 +106,13 @@ describe "inspec check" do
assert_exit_code 1, out
end
end
describe "inspec check with unsatisfied runtime version constraint" do
it "should enforce runtime version constraint" do
out = inspec("check #{profile_path}/unsupported_inspec")
out.stdout.must_include "The current inspec version #{Inspec::VERSION}"
out.stdout.must_include ">= 99.0.0"
assert_exit_code 1, out
end
end
end