Skip to content

Commit

Permalink
Added unit test which covers imagename creation with registries on no…
Browse files Browse the repository at this point in the history
…n default ports.

Signed-off-by: Markus Hartmann <[email protected]>
  • Loading branch information
aidun committed Mar 18, 2020
1 parent b0a70a3 commit c857a83
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions schema/image_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,12 @@ func Test_BuildImageName_BranchAndSHAFormat(t *testing.T) {
t.Errorf("BuildImageName want: \"%s\", got: \"%s\"", want, got)
}
}

func Test_BuildImageName_RegistryWithPort(t *testing.T) {
want := "registry.domain:8080/image:latest"
got := BuildImageName(DefaultFormat, "registry.domain:8080/image", "ef384", "master")

if got != want {
t.Errorf("BuildImageName want: \"%s\", got: \"%s\"", want, got)
}
}

0 comments on commit c857a83

Please sign in to comment.