Skip to content

Commit

Permalink
in_tail: Fix a broken test on Windows
Browse files Browse the repository at this point in the history
Signed-off-by: Takuro Ashie <[email protected]>
  • Loading branch information
ashie committed Mar 9, 2022
1 parent fad9173 commit daa0c1b
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions test/plugin/test_in_tail.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2271,10 +2271,14 @@ def test_ENOENT_error_after_setup_watcher
'format' => 'none',
})
d = create_driver(config)
file_deleted = false
mock.proxy(d.instance).existence_path do |hash|
cleanup_file(path)
unless file_deleted
cleanup_file(path)
file_deleted = true
end
hash
end.at_least(1)
end.twice
assert_nothing_raised do
d.run(shutdown: false) {}
end
Expand All @@ -2300,7 +2304,7 @@ def test_EACCES_error_after_setup_watcher
mock.proxy(d.instance).existence_path do |hash|
FileUtils.chmod(0000, "#{TMP_DIR}/noaccess")
hash
end.at_least(1)
end.twice
assert_nothing_raised do
d.run(shutdown: false) {}
end
Expand Down

0 comments on commit daa0c1b

Please sign in to comment.