@@ -95,12 +95,12 @@ LABEL version=0.1`, testutil.CommonImage)
95
95
base .Cmd ("build" , "-t" , tempName , "-f" , buildCtx + "/Dockerfile" , buildCtx ).AssertOK ()
96
96
defer base .Cmd ("rmi" , tempName ).AssertOK ()
97
97
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 ()
104
104
105
105
// before/since filters are not compatible with DOCKER_BUILDKIT=1? (but still compatible with DOCKER_BUILDKIT=0)
106
106
if base .Target == testutil .Nerdctl {
@@ -119,8 +119,8 @@ LABEL version=0.1`, testutil.CommonImage)
119
119
base .Cmd ("images" , "--filter" , "label=foo=bar" , "--filter" , "label=version=0.2" ).AssertOutNotContains (tempName )
120
120
base .Cmd ("images" , "--filter" , "label=version" ).AssertOutContains (tempName )
121
121
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 " )
124
124
}
125
125
126
126
func TestImagesFilterDangling (t * testing.T ) {
0 commit comments