-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Kevin Hannon <kehannon@redhat.com>
- Loading branch information
Showing
2 changed files
with
35 additions
and
0 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/usr/bin/env bats | ||
# vim: set syntax=sh: | ||
|
||
load helpers | ||
|
||
function setup() { | ||
setup_test | ||
start_crio | ||
} | ||
|
||
function teardown() { | ||
cleanup_test | ||
} | ||
|
||
@test "image fs info with default settings should return matching container_filesystem and image_filesystem" { | ||
output=$(crictl imagefsinfo) | ||
[ "$output" != "" ] | ||
|
||
container_output=$(jq -e '.status.containerFilesystems[0]' <<< "$output") | ||
image_output=$(jq -e '.status.imageFilesystems[0]' <<< "$output") | ||
# if these are the same we can directly compare. | ||
[ "$container_output" = "$image_output" ] | ||
} | ||
|
||
@test "image fs info with imagestore set should return different filesystems" { | ||
stop_crio | ||
CONTAINER_IMAGESTORE="$TESTDIR/imagestore" start_crio | ||
output=$(crictl imagefsinfo) | ||
[ "$output" != "" ] | ||
|
||
container_output=$(jq -e '.status.containerFilesystems[0]' <<< "$output") | ||
image_output=$(jq -e '.status.imageFilesystems[0]' <<< "$output") | ||
[ "$container_output" != "$image_output" ] | ||
} |