1
0
mirror of https://github.com/openshift/source-to-image.git synced 2026-02-05 12:44:54 +01:00
Files
source-to-image/test/generate_test.go
2020-06-02 14:29:57 -04:00

20 lines
529 B
Go

package test
import (
"testing"
"github.com/openshift/source-to-image/pkg/cmd/cli/cmd"
)
func TestGenerate_canonizeBuilderImageArg(t *testing.T) {
assertCanonize := func(t *testing.T, input string, expected string) {
got := cmd.CanonizeBuilderImageArg(input)
if got != expected {
t.Fail()
}
}
assertCanonize(t, "docker://docker.io/centos/nodejs-10-centos7", "docker://docker.io/centos/nodejs-10-centos7")
assertCanonize(t, "docker.io/centos/nodejs-10-centos7", "docker://docker.io/centos/nodejs-10-centos7")
}