mirror of
https://github.com/inspec/inspec
synced 2024-11-10 07:04:15 +00:00
Handles edge cases for parallelization
Signed-off-by: Nick Schwaderer <nschwaderer@chef.io>
This commit is contained in:
parent
4c03ad4c55
commit
cbe105bbe0
1 changed files with 2 additions and 2 deletions
|
@ -8,7 +8,7 @@ describe "inspec check" do
|
|||
|
||||
describe "inspec clear_cache" do
|
||||
it "clears any existing cache" do
|
||||
dirname = File.expand_path("~/.inspec/cache")
|
||||
dirname = File.expand_path("~/.inspec/#{SecureRandom.hex(10)}/alt-cache")
|
||||
unless File.directory?(dirname)
|
||||
FileUtils.mkdir_p(dirname)
|
||||
end
|
||||
|
@ -17,7 +17,7 @@ describe "inspec check" do
|
|||
|
||||
assert !Dir.glob(newfile).empty?
|
||||
|
||||
out = inspec("clear_cache")
|
||||
out = inspec("clear_cache --vendor-cache=#{dirname}")
|
||||
|
||||
assert_empty Dir.glob(newfile)
|
||||
assert_exit_code 0, out
|
||||
|
|
Loading…
Reference in a new issue