-
Notifications
You must be signed in to change notification settings - Fork 21
create tests/config.bats
(fixes #2119)
#2121
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
base: master
Are you sure you want to change the base?
Conversation
tests/config.bats
(fixes #2119)tests/config.bats
(fixes #2119)
tests/config.bats
Outdated
load test-helper | ||
|
||
@test "$clinom config" { | ||
skip "Run $clinom config with the [update|add|delete|clear] subcommands" |
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.
This test could check for the 2 possible outputs of treehouses config
:
Error: config file is empty; no variables to show
CONFIG_NAME
=VARIABLE
tests/config.bats
Outdated
if [[ "$output" == *"Error"* ]]; then | ||
skip "Missing varname or varvalue" | ||
fi |
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.
This test could create a fake config variable like an apitoken for Gitter/Discord/Slack.
tests/config.bats
Outdated
if [[ "$output" == *"Error"* ]]; then | ||
skip "Missing varname or varvalue" | ||
fi |
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.
This test could create a fake config variable like an apitoken for Gitter/Discord/Slack.
tests/config.bats
Outdated
if [[ "$output" == *"Error"* ]]; then | ||
skip "Missing varname" | ||
fi |
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.
This test could create a fake config variable like an apitoken for Gitter/Discord/Slack.
tests/config.bats
Outdated
if [[ "$output" == *"Error"* ]]; then | ||
skip "Can't delete a non-existent user" | ||
fi |
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.
This test could assert_output --partial
for the error output.
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.
Thorough test. 😌👍
No description provided.