(t *testing.T)
| 9 | ) |
| 10 | |
| 11 | func 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 | |
| 33 | func TestValidateHooks(t *testing.T) { |
| 34 | config := &latest.Config{ |
nothing calls this directly
no test coverage detected