MCPcopy Index your code
hub / github.com/nginx-proxy/docker-gen / TestDockerImageString

Function TestDockerImageString

internal/context/context_test.go:157–169  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

155}
156
157func TestDockerImageString(t *testing.T) {
158 image := &DockerImage{Repository: "foo/bar"}
159 assert.Equal(t, "foo/bar", image.String())
160
161 image.Registry = "baz.io"
162 assert.Equal(t, "baz.io/foo/bar", image.String())
163
164 image.Tag = "qux"
165 assert.Equal(t, "baz.io/foo/bar:qux", image.String())
166
167 image.Registry = ""
168 assert.Equal(t, "foo/bar:qux", image.String())
169}

Callers

nothing calls this directly

Calls 1

StringMethod · 0.95

Tested by

no test coverage detected