-
Notifications
You must be signed in to change notification settings - Fork 767
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
Add some tests and test steps for buildah #1966
Changes from 1 commit
8d7eb39
7906b01
38337d8
8c9d2f9
a0f50a8
6a6a365
92c2652
fbce1c3
5e8fc71
756d6eb
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
Add some checkpoint for checking container name and id inside the tests. Signed-off-by: Yiqiao Pu <[email protected]>
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,6 +27,8 @@ load helpers | |
cid2=$(buildah from --pull=false --signature-policy ${TESTSDIR}/policy.json busybox) | ||
run_buildah --log-level=error containers --format "{{.ContainerName}}" | ||
expect_line_count 2 | ||
expect_output --from="${lines[0]}" "alpine-working-container" | ||
expect_output --from="${lines[1]}" "busybox-working-container" | ||
|
||
buildah rm -a | ||
buildah rmi -a -f | ||
|
@@ -45,6 +47,7 @@ load helpers | |
cid2=$(buildah from --pull=false --signature-policy ${TESTSDIR}/policy.json busybox) | ||
run_buildah --log-level=error containers --noheading | ||
expect_line_count 2 | ||
[[ "$output" != "NAME"* ]] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This does not do what you think it does. It's clear that I need to add a 'not in output' test. Until I do so, please use: if [[ $output =~ NAME ]]; then
expect_output "[no instance of 'NAME']" "buildah containers --noheading"
fi Likewise with lines 62-63 below. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please address this. As I wrote, this does not work: it does not do what you think it does. What it does is pass if |
||
|
||
buildah rm -a | ||
buildah rmi -a -f | ||
|
@@ -56,6 +59,9 @@ load helpers | |
run_buildah --log-level=error containers --quiet | ||
expect_line_count 2 | ||
|
||
[[ "${lines[0]}" != "$cid1"* ]] | ||
[[ "${lines[1]}" != "$cid2"* ]] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. See line 50 |
||
|
||
buildah rm -a | ||
buildah rmi -a -f | ||
} |
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.
Nice. Thanks.