mirror of
https://github.com/inspec/inspec
synced 2024-11-24 05:33:17 +00:00
Merge pull request #1873 from chef/dr/fix-sudo-test
bugfix: adjust localhost+sudo test output to train update
This commit is contained in:
commit
72f4d4be89
3 changed files with 3 additions and 3 deletions
|
@ -4,7 +4,6 @@ driver:
|
|||
|
||||
provisioner:
|
||||
name: chef_solo
|
||||
require_chef_omnibus: 12.12.15
|
||||
|
||||
verifier:
|
||||
name: inspec
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
---
|
||||
driver:
|
||||
name: dokken
|
||||
chef_version: 12.5.1
|
||||
chef_version: 12.19.36
|
||||
privileged: true # because Docker and SystemD/Upstart
|
||||
|
||||
transport:
|
||||
|
|
|
@ -252,7 +252,8 @@ Test Summary: \e[38;5;41m2 successful\e[0m, \e[38;5;9m0 failures\e[0m, \e[38;5;2
|
|||
describe 'when trying to use --sudo with a local target' do
|
||||
it 'must print an error and exit' do
|
||||
out = inspec("exec #{File.join(profile_path, 'profile-support-skip')} --sudo")
|
||||
out.stdout.force_encoding(Encoding::UTF_8).must_include "--sudo is only valid when running against a remote host using --target"
|
||||
str = "Sudo is only valid when running against a remote host. To run this locally with elevated privileges, run the command with `sudo ...`.\n"
|
||||
out.stderr.force_encoding(Encoding::UTF_8).must_include str
|
||||
out.exit_status.must_equal 1
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue