mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 23:15:14 +00:00
kubeadm: Add missing unit test for GetGenericImage
Signed-off-by: Rostislav M. Georgiev <rostislavg@vmware.com>
This commit is contained in:
parent
14dbfdcc3b
commit
8c59c6d219
@ -32,6 +32,19 @@ const (
|
||||
gcrPrefix = "k8s.gcr.io"
|
||||
)
|
||||
|
||||
func TestGetGenericImage(t *testing.T) {
|
||||
const (
|
||||
prefix = "foo"
|
||||
image = "bar"
|
||||
tag = "baz"
|
||||
)
|
||||
expected := fmt.Sprintf("%s/%s:%s", prefix, image, tag)
|
||||
actual := GetGenericImage(prefix, image, tag)
|
||||
if actual != expected {
|
||||
t.Errorf("failed GetGenericImage:\n\texpected: %s\n\t actual: %s", expected, actual)
|
||||
}
|
||||
}
|
||||
|
||||
func TestGetGenericArchImage(t *testing.T) {
|
||||
const (
|
||||
prefix = "foo"
|
||||
|
Loading…
Reference in New Issue
Block a user