Skip to content

Commit c857a83

Browse files
committed
Added unit test which covers imagename creation with registries on non default ports.
Signed-off-by: Markus Hartmann <[email protected]>
1 parent b0a70a3 commit c857a83

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

schema/image_test.go

+9
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,12 @@ func Test_BuildImageName_BranchAndSHAFormat(t *testing.T) {
3737
t.Errorf("BuildImageName want: \"%s\", got: \"%s\"", want, got)
3838
}
3939
}
40+
41+
func Test_BuildImageName_RegistryWithPort(t *testing.T) {
42+
want := "registry.domain:8080/image:latest"
43+
got := BuildImageName(DefaultFormat, "registry.domain:8080/image", "ef384", "master")
44+
45+
if got != want {
46+
t.Errorf("BuildImageName want: \"%s\", got: \"%s\"", want, got)
47+
}
48+
}

0 commit comments

Comments
 (0)