@@ -95,12 +95,12 @@ LABEL version=0.1`, testutil.CommonImage)
9595 base .Cmd ("build" , "-t" , tempName , "-f" , buildCtx + "/Dockerfile" , buildCtx ).AssertOK ()
9696 defer base .Cmd ("rmi" , tempName ).AssertOK ()
9797
98- busyboxGlibc , busyboxUclibc := "busybox:glibc" , "busybox:uclibc"
99- base . Cmd ( "pull " , busyboxGlibc ). AssertOK ()
100- defer base .Cmd ("rmi " , busyboxGlibc ). AssertOK ()
101-
102- base .Cmd ("pull " , busyboxUclibc ).AssertOK ()
103- defer base .Cmd ("rmi" , busyboxUclibc ).AssertOK ()
98+ // This test is about testing local filtering of image names - as such, we do not need remote images at all
99+ taggedOne , taggedTwo := "taggedimage:xfoox " , "taggedimage:yzfooyz"
100+ base .Cmd ("tag " , testutil . CommonImage , taggedOne ). Run ()
101+ base . Cmd ( "tag" , testutil . CommonImage , taggedTwo ). Run ()
102+ defer base .Cmd ("rmi " , taggedOne ).AssertOK ()
103+ defer base .Cmd ("rmi" , taggedTwo ).AssertOK ()
104104
105105 // before/since filters are not compatible with DOCKER_BUILDKIT=1? (but still compatible with DOCKER_BUILDKIT=0)
106106 if base .Target == testutil .Nerdctl {
@@ -119,8 +119,8 @@ LABEL version=0.1`, testutil.CommonImage)
119119 base .Cmd ("images" , "--filter" , "label=foo=bar" , "--filter" , "label=version=0.2" ).AssertOutNotContains (tempName )
120120 base .Cmd ("images" , "--filter" , "label=version" ).AssertOutContains (tempName )
121121 base .Cmd ("images" , "--filter" , fmt .Sprintf ("reference=%s*" , tempName )).AssertOutContains (tempName )
122- base .Cmd ("images" , "--filter" , "reference=busy *:*libc *" ).AssertOutContains ("glibc " )
123- base .Cmd ("images" , "--filter" , "reference=busy *:*libc *" ).AssertOutContains ("uclibc " )
122+ base .Cmd ("images" , "--filter" , "reference=tag *:*foo *" ).AssertOutContains ("xfoox " )
123+ base .Cmd ("images" , "--filter" , "reference=tag *:*foo *" ).AssertOutContains ("yzfooyz " )
124124}
125125
126126func TestImagesFilterDangling (t * testing.T ) {
0 commit comments