Remove any inspec.lock file before testing vendoring. (#3377)

Signed-off-by: Jared Quick <jquick@chef.io>
This commit is contained in:
Jared Quick 2018-09-10 10:15:16 -04:00 committed by GitHub
parent f6ecb4c842
commit 30e43c294d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -131,6 +131,8 @@ Test Summary: 0 successful, 0 failures, 0 skipped
# it exists to avoid surprises when checking cache contents later.
vendor_dir = File.join(inheritance_profile, 'vendor')
FileUtils.remove_dir(vendor_dir) if File.exist?(vendor_dir)
lock_file = File.join(inheritance_profile, 'inspec.lock')
File.delete(lock_file) if File.exist?(lock_file)
command = 'exec ' + inheritance_profile + ' --no-create-lockfile'
out = inspec_with_env(command, INSPEC_CONFIG_DIR: tmpdir)