Skip to content

Commit c582017

Browse files
authored
Merge pull request #1337 from cgwalters/no-canon-cstorage
spec: Don't canonicalize containers-storage
2 parents 51123ab + 31b4ff6 commit c582017

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

lib/src/spec.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ impl ImageReference {
113113
// TODO maintain a proper transport enum in the spec here
114114
let transport = Transport::try_from(self.transport.as_str())?;
115115
match transport {
116-
Transport::ContainerStorage | Transport::Registry => {
116+
Transport::Registry => {
117117
let reference: oci_spec::distribution::Reference = self.image.parse()?;
118118

119119
// Check if the image reference needs canonicicalization
@@ -350,11 +350,6 @@ mod tests {
350350
format!("quay.io/example/someimage@{}", sample_digest),
351351
"registry",
352352
),
353-
(
354-
format!("quay.io/example/someimage:latest@{}", sample_digest),
355-
format!("quay.io/example/someimage@{}", sample_digest),
356-
"containers-storage",
357-
),
358353
// When only a digest is present, it should be used
359354
(
360355
format!("quay.io/example/someimage@{}", sample_digest),
@@ -385,7 +380,12 @@ mod tests {
385380
format!("localhost/someimage@{sample_digest}"),
386381
"registry",
387382
),
388-
// Also for now, we do not canonicalize OCI references
383+
// Other cases are not canonicalized
384+
(
385+
format!("quay.io/example/someimage:latest@{}", sample_digest),
386+
format!("quay.io/example/someimage:latest@{}", sample_digest),
387+
"containers-storage",
388+
),
389389
(
390390
format!("/path/to/dir:latest"),
391391
format!("/path/to/dir:latest"),

0 commit comments

Comments
 (0)