-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
tests: path quoting and boilerplate #2002
Conversation
45e6985
to
6c7616f
Compare
:grumble grumble: the OSX.11 test runner is so slow that it fails the |
dc67273
to
cace1cb
Compare
3272aa5
to
723bebd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could add test/run
to clean_files.txt
as well
...and `cite()`s metadata
For testing non-core files, just `load ../test_helper_libs` after `load ../test_helper` instead of trying to guess which libs must be loaded, in which order, for testing to succeed. `_command_exists` spews log messages, so our test log is littered with `_log_debug not found`. This fixes that too.
Literally copying a line from the source to be tested is perhaps not the best way to test that code. 😉 That said, we do want to verify that the function was actually loaded. TODO: actually test the function.
Test was failing only on Mac OS X for some reason, so refactor a little. It turned out to be due to explicitly setting `$HOME` *after* loading the plugin.
This subshell is...wut
Symlink `/test_lib/bats-core/test/fixtures/parallel/suite/helper.bash` references a not-existing file, but it's in a submodule so I can't just fix it. Exclude it from `rsync` in `setup_test_fixture()`.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Horray!
Great work @gaelicWizard
Description
All tests now run when there are spaces in
$BASH_IT
, and boilerplate removed from the top of most test files.Motivation and Context
As I'm learning BATS, I'm cleaning up duplicate code and hopefully making the tests faster and more reliable. There's more to do! This is just my first pass.
How Has This Been Tested?
I run the tests manually myself, and alsö through GitHub Actions.
Types of changes
Checklist:
clean_files.txt
and formatted it usinglint_clean_files.sh
.