From 9b77370213ac84d3c7ee8a57fd86a724e177270f Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Thu, 4 Jun 2020 11:18:18 -0700 Subject: [PATCH] int/build/TestBuildWithEmptyLayers: prevent panic The test case panics like that: > build_test.go:381: assertion failed: 3 (int) != 1 (int) > panic: runtime error: index out of range [2] with length 1 [recovered] > panic: runtime error: index out of range [2] with length 1 The fix is trivial. Signed-off-by: Kir Kolyshkin --- integration/build/build_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integration/build/build_test.go b/integration/build/build_test.go index edbfb37935..cd682a5e58 100644 --- a/integration/build/build_test.go +++ b/integration/build/build_test.go @@ -378,7 +378,7 @@ RUN cat somefile` imageIDs, err := getImageIDsFromBuild(out.Bytes()) assert.NilError(t, err) - assert.Check(t, is.Equal(3, len(imageIDs))) + assert.Assert(t, is.Equal(3, len(imageIDs))) image, _, err := apiclient.ImageInspectWithRaw(context.Background(), imageIDs[2]) assert.NilError(t, err)