Skip to content

Conversation

@Hyask
Copy link
Member

@Hyask Hyask commented Nov 5, 2025

Please read the full commit description. I won't repeat myself.

Hyask added 2 commits November 5, 2025 16:39
Before those fixes, running the test suite resulted in the following
errors:
```
running 9 tests
test tests::test_can_tail_file_with_directory ... ok
test tests::test_can_tail_file_with_nonexistent_file ... FAILED
test tests::test_can_tail_file_with_existing_file ... ok
test tests::test_can_tail_file_with_unreadable_file ... ok
test tests::test_run_command_nonexistent_command ... ok
test tests::test_run_command_success ... ok
test tests::test_run_command_with_args ... ok
test tests::test_main_fails_without_fallback_command ... FAILED
test tests::test_run_command_calling_tailor_again ... ok

failures:

---- tests::test_can_tail_file_with_nonexistent_file stdout ----

thread 'tests::test_can_tail_file_with_nonexistent_file' panicked at src/main.rs:114:9:
Should not be able to tail a nonexistent file
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

---- tests::test_main_fails_without_fallback_command stdout ----

thread 'tests::test_main_fails_without_fallback_command' panicked at /home/skia/.rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:250:5:
Unexpected success
command=`"/home/skia/workspace/ubuntu/tailor/target/debug/tailor" "/tmp/nonexistent_file_12345"`
code=0
stdout=""
stderr=""

failures:
    tests::test_can_tail_file_with_nonexistent_file
    tests::test_main_fails_without_fallback_command

test result: FAILED. 7 passed; 2 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.02s
```

I believe this is because the test suite is too opinionated, and relies
on an arbitrary file not existing.
I happened to use that important file in my personal workflow, hence the
test suite broke.
Thankfully, I'm a nice contributor and was able to use my skills to fix
this. It now passes on my machine. Thank you.
Copy link
Member

@nadzyah nadzyah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for fixing the typos and improving tests!

@nadzyah nadzyah merged commit d26a940 into main Nov 5, 2025
1 check passed
@nadzyah nadzyah deleted the skia/fix_tests_on_my_machine branch November 5, 2025 16:10
@Hyask
Copy link
Member Author

Hyask commented Nov 5, 2025

Just added all the reviewers because I thought it took to much time to get reviewed, but then @nadzyah merged it, so thanks, and not sorry for the noise :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.