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

Create unit tests for BATS helper functions #5134

Merged
merged 2 commits into from
Jul 20, 2023

Conversation

jandubois
Copy link
Member

No description provided.

bats/scripts/bats-lint.pl Show resolved Hide resolved
bats/tests/helpers/utils.bash Show resolved Hide resolved
bats/tests/helpers/utils.bash Show resolved Hide resolved
bats/tests/helpers/utils.bash Show resolved Hide resolved
bats/tests/helpers/vm.bash Outdated Show resolved Hide resolved
bats/tests/profile/sample.bats Outdated Show resolved Hide resolved
bats/tests/helpers/utils.bats Show resolved Hide resolved
bats/tests/helpers/utils.bats Show resolved Hide resolved
Copy link
Member Author

@jandubois jandubois left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've amended the last commit to revert the erroneous changes from tryrun try in helpers/vm.bash and profile/sample.bats.

bats/scripts/bats-lint.pl Show resolved Hide resolved
bats/tests/helpers/utils.bash Show resolved Hide resolved
bats/tests/helpers/utils.bash Show resolved Hide resolved
bats/tests/helpers/utils.bash Show resolved Hide resolved
bats/tests/helpers/utils.bats Show resolved Hide resolved
bats/tests/helpers/utils.bats Show resolved Hide resolved
bats/tests/helpers/vm.bash Outdated Show resolved Hide resolved
bats/tests/profile/sample.bats Outdated Show resolved Hide resolved
@jandubois
Copy link
Member Author

I've amended the last commit to revert the erroneous changes from tryrun try in helpers/vm.bash and profile/sample.bats.

Unfortunately this breaks the current bats-lint.pl script. I've duplicated the corresponding change from another PR.

@test 'json_string' {
run json_string foo\ bar\"baz\'
assert_success
assert_output "\"foo bar\\\"baz'\""
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

??? Do you have a question about this?

Signed-off-by: Jan Dubois <jan.dubois@suse.com>
See rancher-sandbox#5104

So we don't need to check the output of `rdctl api /settings` for
it anymore.

Signed-off-by: Jan Dubois <jan.dubois@suse.com>
bats/tests/helpers/utils.bats Show resolved Hide resolved
bats/tests/helpers/utils.bats Show resolved Hide resolved
@jandubois jandubois merged commit f7a8088 into rancher-sandbox:main Jul 20, 2023
@jandubois jandubois deleted the bats-helpers branch July 20, 2023 21:56
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.

2 participants