summaryrefslogtreecommitdiff
path: root/libpod/image/parts_test.go
diff options
context:
space:
mode:
authorMiloslav Trmač <mitr@redhat.com>2019-01-09 21:47:50 +0100
committerMiloslav Trmač <mitr@redhat.com>2019-01-14 04:07:24 +0100
commit449116af19305a567933effaced5a0a21a8c71be (patch)
tree854b66b38db0ef397c9b0911cbf95da7f2849b48 /libpod/image/parts_test.go
parent797d194050d4b7b78d255d19f4099463dc048425 (diff)
downloadpodman-449116af19305a567933effaced5a0a21a8c71be.tar.gz
podman-449116af19305a567933effaced5a0a21a8c71be.tar.bz2
podman-449116af19305a567933effaced5a0a21a8c71be.zip
Remove imageParts.{isTagged,registry,name,tag}
Finally, these members no longer have any users. Future users should usually call referenceWithRegistry / normalizedReference, and work with the returned value, instead of reintroducing these variables. Similarly, direct uses of unnormalizedRef should be rare (only for cases where the registry and/or path truly does not matter). Should not change behavior. Signed-off-by: Miloslav Trmač <mitr@redhat.com>
Diffstat (limited to 'libpod/image/parts_test.go')
-rw-r--r--libpod/image/parts_test.go19
1 files changed, 9 insertions, 10 deletions
diff --git a/libpod/image/parts_test.go b/libpod/image/parts_test.go
index dd4a7b27f..726e55e86 100644
--- a/libpod/image/parts_test.go
+++ b/libpod/image/parts_test.go
@@ -13,30 +13,30 @@ func TestDecompose(t *testing.T) {
for _, c := range []struct {
input string
registry, name, suspiciousTagValueForSearch string
- isTagged, hasRegistry bool
+ hasRegistry bool
}{
- {"#", "", "", "", false, false}, // Entirely invalid input
+ {"#", "", "", "", false}, // Entirely invalid input
{ // Fully qualified docker.io, name-only input
- "docker.io/library/busybox", "docker.io", "library/busybox", "latest", false, true,
+ "docker.io/library/busybox", "docker.io", "library/busybox", "latest", true,
},
{ // Fully qualified example.com, name-only input
- "example.com/ns/busybox", "example.com", "ns/busybox", "latest", false, true,
+ "example.com/ns/busybox", "example.com", "ns/busybox", "latest", true,
},
{ // Unqualified single-name input
- "busybox", "", "busybox", "latest", false, false,
+ "busybox", "", "busybox", "latest", false,
},
{ // Unqualified namespaced input
- "ns/busybox", "", "ns/busybox", "latest", false, false,
+ "ns/busybox", "", "ns/busybox", "latest", false,
},
{ // name:tag
- "example.com/ns/busybox:notlatest", "example.com", "ns/busybox", "notlatest", true, true,
+ "example.com/ns/busybox:notlatest", "example.com", "ns/busybox", "notlatest", true,
},
{ // name@digest
// FIXME? .suspiciousTagValueForSearch == "none"
- "example.com/ns/busybox" + digestSuffix, "example.com", "ns/busybox", "none", false, true,
+ "example.com/ns/busybox" + digestSuffix, "example.com", "ns/busybox", "none", true,
},
{ // name:tag@digest
- "example.com/ns/busybox:notlatest" + digestSuffix, "example.com", "ns/busybox", "notlatest", true, true,
+ "example.com/ns/busybox:notlatest" + digestSuffix, "example.com", "ns/busybox", "notlatest", true,
},
} {
parts, err := decompose(c.input)
@@ -48,7 +48,6 @@ func TestDecompose(t *testing.T) {
assert.Equal(t, c.registry, registry, c.input)
assert.Equal(t, c.name, name, c.input)
assert.Equal(t, c.suspiciousTagValueForSearch, suspiciousTagValueForSearch, c.input)
- assert.Equal(t, c.isTagged, parts.isTagged, c.input)
assert.Equal(t, c.hasRegistry, parts.hasRegistry, c.input)
}
}