mirror of
https://github.com/inspec/inspec
synced 2024-11-10 15:14:23 +00:00
Ignore intermittent test teardown error
Occasionally when the `isolated` tests run in CI, this error is seen: ``` inspec-reporter-html2::when run on a basic profile#test_0002_should produce valid HTML: Errno::ENOENT: No such file or directory @ apply2files - /tmp/temp20200625-1802-2izu7e.html /usr/local/lib/ruby/2.6.0/fileutils.rb:1437:in `unlink' /usr/local/lib/ruby/2.6.0/fileutils.rb:1437:in `block in remove_file' /usr/local/lib/ruby/2.6.0/fileutils.rb:1442:in `platform_support' /usr/local/lib/ruby/2.6.0/fileutils.rb:1436:in `remove_file' /usr/local/lib/ruby/2.6.0/fileutils.rb:775:in `remove_file' /usr/local/lib/ruby/2.6.0/fileutils.rb:562:in `block in rm' /usr/local/lib/ruby/2.6.0/fileutils.rb:561:in `each' /usr/local/lib/ruby/2.6.0/fileutils.rb:561:in `rm' lib/plugins/inspec-reporter-html2/test/functional/inspec_reporter_html2_test.rb:9:in `teardown' ``` It should be OK to ignore the failure to delete the test file - the issue doesn't reproduce on laptops, and CI uses clean VMs each time. Signed-off-by: James Stocks <jstocks@chef.io>
This commit is contained in:
parent
41b99e4e45
commit
d94d56c4b9
1 changed files with 2 additions and 1 deletions
|
@ -6,7 +6,8 @@ describe "inspec-reporter-html2" do
|
|||
|
||||
let(:output_file) { f = Tempfile.new(["temp", ".html"]); f.close; f.path }
|
||||
def teardown
|
||||
FileUtils.rm(output_file)
|
||||
# Use force because the deletion may occasionally fail in parallel CI
|
||||
FileUtils.rm_f(output_file)
|
||||
end
|
||||
|
||||
describe "when run on a basic profile" do
|
||||
|
|
Loading…
Reference in a new issue