First, a simple, wrong directory is used for helpers. This leads to this error:
./tests/bats/bin/bats ./tests/ask.bats
ask.bats
✗ ask contains -e: should error code without correct parameter
(from function `setup' in test file tests/ask.bats, line 26)
`setup() {' failed
bats_load_safe: Could not find '/home/igor_lysak/hub-extensions/tests/test_helper/bats-support/load'[.bash]
✗ ask env: should print messages if parameters need to set for different component discriminators
(from function `setup' in test file tests/ask.bats, line 26)
`setup() {' failed
bats_load_safe: Could not find '/home/igor_lysak/hub-extensions/tests/test_helper/bats-support/load'[.bash]
✗ ask env: should success if env exist
(from function `setup' in test file tests/ask.bats, line 26)
`setup() {' failed
bats_load_safe: Could not find '/home/igor_lysak/hub-extensions/tests/test_helper/bats-support/load'[.bash]
✗ ask env: should print messages if parameters already set for different component discriminators
(from function `setup' in test file tests/ask.bats, line 26)
`setup() {' failed
bats_load_safe: Could not find '/home/igor_lysak/hub-extensions/tests/test_helper/bats-support/load'[.bash]
✗ ask env: should print messages if parameter need to set without different component discriminators
(from function `setup' in test file tests/ask.bats, line 26)
`setup() {' failed
bats_load_safe: Could not find '/home/igor_lysak/hub-extensions/tests/test_helper/bats-support/load'[.bash]
✗ ask env: should print messages if parameter already set without different component discriminators
✗ teardown_file failed `setup() {' failed
bats_load_safe: Could not find '/home/igor_lysak/hub-extensions/tests/test_helper/bats-support/load'[.bash]
(from function `teardown_file' in test file tests/ask.bats, line 90)
`rm .env .ask.env' failed
removed '.ask.env'
removed 'ask.params-component.yaml'
rm: cannot remove '.env': No such file or directory
rm: cannot remove '.ask.env': No such file or directory
Second. After fixing the name of helpers directory test was stuck on the second test case.
./tests/bats/bin/bats ./tests/ask.bats
ask.bats
✓ ask contains -e: should error code without correct parameter
ask env: should print messages if parameters need to set for different component discriminators
@NellyHargeliya please be advised: rm "$HUB_FILES" "$DOTENV_FILE" will not delete "$HUB_FILES" if more than one, because of "". There is no needs, then shellfcheck can be disabled for this as well
This test has two issues:
First, a simple, wrong directory is used for helpers. This leads to this error:
Second. After fixing the name of helpers directory test was stuck on the second test case.