[1.18] test/config: fix "config dir should fail with invalid option" #4222
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Sometimes this test fails like this:
The reason it fails is logs are written by using tee,
which for some reason is run in a subshell, and it looks
like a race between the main shell and the subshell.
Anyway, using tee is not needed here. Simplify it by using run,
and add a check for non-zero exit code.
The second proble is, the test is not doing what it supposed to.
Judging by the test name ("config dir should fail"), it seems the test
should write a correct log_level value to the main config file, a wrong
value to a file under crio.conf.d, and check that crio fails.
The problem is, the value in main file is wrong as well it is not quoted.
Fix the test so the main config file has the correct log_level value.
Fix the output check to look for the specific bad key.
Signed-off-by: Kir Kolyshkin [email protected]
What type of PR is this?
/kind flake
What this PR does / why we need it:
Which issue(s) this PR fixes:
Special notes for your reviewer:
cherry-pick of #4220
Does this PR introduce a user-facing change?