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

fix(tests): correct syntax for all tests #96

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

themightychris
Copy link

@themightychris themightychris commented Dec 2, 2024

DRAFT: I haven't had a chance yet to verify all cases

What kind of change does this PR introduce?

Bug fix

What is the current behavior?

All of the tests currently pass even when every service is down due to various syntax errors

What is the new behavior?

Tests all fail if services are down and pass if they are up

Additional context

  • $(echo "\e[0;31mFailed to connect to the database." && exit 1) attempts to execute "Failed" text that comes out of echo
  • ( echo -e "\e[0;31mFailed to get a valid response." && exit 1 ) exits the subshell that using parenthesis creates and doesn't pass exit status out to script
  • curl -sfo /dev/null on its own, with sh not being invoked with the -e option, doesn't cause the shell to exit with an error code when it fails because it proceeds to the echo command which succeeds
  • Terminal coloring needs to be reset at end of error message

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.

1 participant