MCPcopy Index your code
hub / github.com/devspace-sh/devspace / TestValidateImageName

Function TestValidateImageName

pkg/devspace/config/versions/validate_test.go:11–31  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

9)
10
11func TestValidateImageName(t *testing.T) {
12 config := &latest.Config{
13 Images: map[string]*latest.Image{
14 "default": {
15 Image: "localhost:5000/node",
16 },
17 },
18 }
19 err := validateImages(config)
20 assert.NilError(t, err)
21
22 config = &latest.Config{
23 Images: map[string]*latest.Image{
24 "default": {
25 Image: "localhost:5000/node:latest",
26 },
27 },
28 }
29 err = validateImages(config)
30 assert.Error(t, err, "images.default.image 'localhost:5000/node:latest' can not have tag 'latest'")
31}
32
33func TestValidateHooks(t *testing.T) {
34 config := &latest.Config{

Callers

nothing calls this directly

Calls 2

validateImagesFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected