File tree Expand file tree Collapse file tree 1 file changed +23
-1
lines changed Expand file tree Collapse file tree 1 file changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -95,9 +95,31 @@ func TestSplitDockerImageWithRepositoryAndTag(t *testing.T) {
9595 if "ubuntu:12.04" != dockerImage .String () {
9696 t .Fail ()
9797 }
98-
9998}
10099
100+ func TestSplitDockerImageWithPrivateRegistryPath (t * testing.T ) {
101+ registry , repository , tag := splitDockerImage ("localhost:8888/ubuntu/foo:12.04" )
102+
103+ if registry != "localhost:8888" {
104+ t .Fail ()
105+ }
106+
107+ if repository != "ubuntu/foo" {
108+ t .Fail ()
109+ }
110+
111+ if tag != "12.04" {
112+ t .Fail ()
113+ }
114+ dockerImage := DockerImage {
115+ Registry : registry ,
116+ Repository : repository ,
117+ Tag : tag ,
118+ }
119+ if "localhost:8888/ubuntu/foo:12.04" != dockerImage .String () {
120+ t .Fail ()
121+ }
122+ }
101123func TestSplitDockerImageWithLocalRepositoryAndTag (t * testing.T ) {
102124 registry , repository , tag := splitDockerImage ("localhost:8888/ubuntu:12.04" )
103125
You can’t perform that action at this time.
0 commit comments