(t *testing.T)
| 66 | } |
| 67 | |
| 68 | func TestParseUserName(t *testing.T) { |
| 69 | user := "base" |
| 70 | name := "debian" |
| 71 | |
| 72 | // "base/debian" |
| 73 | imageStr := user + "/" + name |
| 74 | |
| 75 | image, err := FromString(imageStr) |
| 76 | assert.NoError(t, err, "valid image name") |
| 77 | |
| 78 | // Name |
| 79 | assert.Equal(t, name, image.Name()) |
| 80 | |
| 81 | // KubeImage |
| 82 | assert.Equal(t, imageStr, image.KubeImage()) |
| 83 | |
| 84 | // PushOptions |
| 85 | out := testSampleWriter(3) |
| 86 | json := true |
| 87 | expected := docker.PushImageOptions{ |
| 88 | Name: imageStr, |
| 89 | Registry: DefaultDockerRegistry, |
| 90 | OutputStream: out, |
| 91 | RawJSONStream: json, |
| 92 | } |
| 93 | assert.Equal(t, expected, image.PushOptions(out, json)) |
| 94 | } |
| 95 | |
| 96 | func TestParseUserTag(t *testing.T) { |
| 97 | user := "base" |
nothing calls this directly
no test coverage detected