Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

in_tail: Simplify TargetInfo related code #3489

Merged
merged 6 commits into from
May 17, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
in_tail: Fix a broken test on Windows
Signed-off-by: Takuro Ashie <ashie@clear-code.com>
  • Loading branch information
ashie committed May 17, 2022
commit b5d7a2553c3fd9675515d621cc1333efe54f8a03
10 changes: 7 additions & 3 deletions test/plugin/test_in_tail.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2457,10 +2457,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 @@ -2486,7 +2490,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