forked from cri-o/cri-o
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Commits a2ec1d4 and 247d465 added a few checks using jq in the following test cases: * ctr lifecycle * ctr execsync should not overwrite initial spec args * privileged ctr -- check for rw mounts Alas, those checks do not work (and never worked); jq always succeeds. This happened because 1. in `run cmd1 ... | cmd2` the part starting with the pipe character is not part of `run` statement; 2. `run` eats `cmd1 ...` output (into `$output` variable); so `cmd2` is provided with empty input. Now, 3. `jq` with empty input does not run any filters and thus succeeds (even with `-e`, see [1]). The fix is to add a separate check that the output is not empty. While at it, remove `run` where it's not needed from the other places in those three tests we fix. [1] jqlang/jq#1628 Signed-off-by: Kir Kolyshkin <[email protected]>
- Loading branch information
Showing
1 changed file
with
43 additions
and
88 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters