@@ -2,7 +2,6 @@ package e2e
22
33import (
44 "bufio"
5- "fmt"
65 "path/filepath"
76 "regexp"
87 "strings"
@@ -12,9 +11,9 @@ import (
1211 "gotest.tools/icmd"
1312)
1413
15- func insertBundles (t * testing.T , cmd icmd.Cmd , info dindSwarmAndRegistryInfo ) {
14+ func insertBundles (t * testing.T , cmd icmd.Cmd ) {
1615 // Push an application so that we can later pull it by digest
17- cmd .Command = dockerCli .Command ("app" , "build" , "--no-resolve-image" , "--tag" , info . registryAddress + " /c-myapp" , filepath .Join ("testdata" , "push-pull" ))
16+ cmd .Command = dockerCli .Command ("app" , "build" , "--no-resolve-image" , "--tag" , "my.registry:5000 /c-myapp" , filepath .Join ("testdata" , "push-pull" ))
1817 icmd .RunCmd (cmd ).Assert (t , icmd .Success )
1918 cmd .Command = dockerCli .Command ("app" , "build" , "--no-resolve-image" , "--tag" , "b-simple-app" , filepath .Join ("testdata" , "simple" ))
2019 icmd .RunCmd (cmd ).Assert (t , icmd .Success )
@@ -59,15 +58,14 @@ func TestImageList(t *testing.T) {
5958 runWithDindSwarmAndRegistry (t , func (info dindSwarmAndRegistryInfo ) {
6059 cmd := info .configuredCmd
6160
62- insertBundles (t , cmd , info )
61+ insertBundles (t , cmd )
6362
64- expected := `REPOSITORY TAG APP IMAGE ID APP NAME
65- %s latest [a-f0-9]{12} push-pull
66- a -simple-app latest [a-f0-9]{12} simple
67- b-simple-app latest [a-f0-9]{12} simple
63+ expected := `REPOSITORY TAG APP IMAGE ID APP NAME
64+ a-simple-app latest [a-f0-9]{12} simple
65+ b -simple-app latest [a-f0-9]{12} simple
66+ my.registry:5000/c-myapp latest [a-f0-9]{12} push-pull
6867`
69- expectedOutput := fmt .Sprintf (expected , info .registryAddress + "/c-myapp" )
70- expectImageListOutput (t , cmd , expectedOutput )
68+ expectImageListOutput (t , cmd , expected )
7169 })
7270}
7371
@@ -97,12 +95,12 @@ func TestImageRm(t *testing.T) {
9795 runWithDindSwarmAndRegistry (t , func (info dindSwarmAndRegistryInfo ) {
9896 cmd := info .configuredCmd
9997
100- insertBundles (t , cmd , info )
98+ insertBundles (t , cmd )
10199
102- cmd .Command = dockerCli .Command ("app" , "image" , "rm" , info . registryAddress + " /c-myapp:latest" )
100+ cmd .Command = dockerCli .Command ("app" , "image" , "rm" , "my.registry:5000 /c-myapp:latest" )
103101 icmd .RunCmd (cmd ).Assert (t , icmd.Expected {
104102 ExitCode : 0 ,
105- Out : "Deleted: " + info . registryAddress + " /c-myapp:latest" ,
103+ Out : "Deleted: my.registry:5000 /c-myapp:latest" ,
106104 })
107105
108106 cmd .Command = dockerCli .Command ("app" , "image" , "rm" , "a-simple-app" , "b-simple-app:latest" )
0 commit comments