Skip to content

Commit b1e8226

Browse files
committed
Fix prior test-porting not aligned with description
Signed-off-by: apostasie <[email protected]>
1 parent f6d36c4 commit b1e8226

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

cmd/nerdctl/image/image_remove_test.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,12 +153,14 @@ func TestRemove(t *testing.T) {
153153
Cleanup: func(data test.Data, helpers test.Helpers) {
154154
helpers.Anyhow("rm", "-f", data.Identifier())
155155
},
156-
Command: test.Command("rmi", "-f", testutil.CommonImage),
156+
Command: test.Command("rmi", testutil.CommonImage),
157157
Expected: func(data test.Data, helpers test.Helpers) *test.Expected {
158158
return &test.Expected{
159+
ExitCode: 1,
160+
Errors: []error{errors.New("image is being used")},
159161
Output: func(stdout string, info string, t *testing.T) {
160162
helpers.Command("images").Run(&test.Expected{
161-
Output: test.DoesNotContain(repoName),
163+
Output: test.Contains(repoName),
162164
})
163165
},
164166
}

0 commit comments

Comments
 (0)