jkfran / killport

A command-line tool to easily kill processes running on a specified port.
MIT License
1.68k stars 37 forks source link

Test match using regular expressions #40

Closed ilmanzo closed 4 months ago

ilmanzo commented 4 months ago

Description of the changes Changed integration tests to match output with a regular expression, to keep in consideration that compiled executable can be run from a temp location ( /tmp/$RANDOM_DIR )

Related issue(s) Fixes #39

Type of change Please select one or multiple of the following options:

Checklist:

Additional information Add any other information or screenshots about the pull request here.

jkfran commented 4 months ago

Thank you so much for reporting and working on a solution.

Can you please fix the conflicts? πŸ™πŸΌ

ilmanzo commented 4 months ago

Thank you so much for reporting and working on a solution.

Can you please fix the conflicts? πŸ™πŸΌ

done, please note that running the test in parallel may conflict, because they spawn a service on the same port. Either use different port for each test, or run the tests with cargo test -- --test-threads=1 to make them sequential.

ilmanzo commented 4 months ago

this also fixes cargo clippy complaints, so we can close #41 as well