mirror of
https://github.com/inspec/inspec
synced 2024-11-10 07:04:15 +00:00
Update CLI option for accepting license; licensing tests pass
Signed-off-by: Clinton Wolfe <clintoncwolfe@gmail.com>
This commit is contained in:
parent
d94addf54a
commit
8d3e704532
1 changed files with 5 additions and 4 deletions
|
@ -6,12 +6,13 @@ describe 'The license acceptance mechanism' do
|
|||
include FunctionalHelper
|
||||
|
||||
describe 'when the license has not been accepted' do
|
||||
describe 'when the user passes the --accept-license flag' do
|
||||
describe 'when the user passes the --chef-license accept flag' do
|
||||
it 'should silently work normally' do
|
||||
Dir.mktmpdir do |tmp_home|
|
||||
run_result = run_inspec_process('shell -c platform.family --accept-license', env: { 'HOME' => tmp_home })
|
||||
run_result.stdout.wont_include 'Chef License Acceptance' # --accept-license should not mention accepting the license
|
||||
run_result = run_inspec_process('shell -c platform.family --chef-license accept', env: { 'HOME' => tmp_home })
|
||||
run_result.stdout.wont_include 'Chef License Acceptance' # --chef-license should not mention accepting the license
|
||||
run_result.stderr.must_equal ''
|
||||
|
||||
run_result.exit_status.must_equal 0
|
||||
end
|
||||
end
|
||||
|
@ -21,7 +22,7 @@ describe 'The license acceptance mechanism' do
|
|||
license_persist_path = File.join(tmp_home, '.chef', 'accepted_licenses', 'inspec')
|
||||
|
||||
File.exist?(license_persist_path).must_equal false # Sanity check
|
||||
run_result = run_inspec_process('shell -c platform.family --accept-license', env: { 'HOME' => tmp_home })
|
||||
run_result = run_inspec_process('shell -c platform.family --chef-license accept', env: { 'HOME' => tmp_home })
|
||||
File.exist?(license_persist_path).must_equal true
|
||||
|
||||
license_persist_contents = YAML.load(File.read(license_persist_path))
|
||||
|
|
Loading…
Reference in a new issue