From a0082611ae47142a6fe9b430e0820dd243a1a191 Mon Sep 17 00:00:00 2001 From: Hayato Kiwata Date: Thu, 17 Oct 2024 15:18:58 +0900 Subject: [PATCH] fix: Allow to delete images when names of images are short digest ids of another images Fixed not to run `canonicalRef.String()` when canonicalRef is nil. ``` canonicalRef, err := referenceutil.ParseAny(req) ``` Also, fixed not to run TestIssue3016 on windows. Signed-off-by: Hayato Kiwata --- cmd/nerdctl/image/image_remove_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmd/nerdctl/image/image_remove_test.go b/cmd/nerdctl/image/image_remove_test.go index 64086287430..0216b755693 100644 --- a/cmd/nerdctl/image/image_remove_test.go +++ b/cmd/nerdctl/image/image_remove_test.go @@ -319,6 +319,9 @@ func TestIssue3016(t *testing.T) { testCase.SubTests = []*test.Case{ { Description: "Issue #3016 - Tags created using the short digest ids of container images cannot be deleted using the nerdctl rmi command.", + Require: test.Require( + test.Not(test.Windows), + ), Setup: func(data test.Data, helpers test.Helpers) { helpers.Ensure("pull", alpineImageName) helpers.Ensure("pull", busyboxImageName)