Skip to content

Commit

Permalink
DO NOT MERGE: Testing containers/image#2603
Browse files Browse the repository at this point in the history
go mod edit -replace github.com/containers/image/v5=github.com/mtrmac/image/v5@untrusted-digest-flag

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
  • Loading branch information
mtrmac committed Oct 16, 2024
1 parent 790468b commit f0a59b8
Show file tree
Hide file tree
Showing 15 changed files with 91 additions and 67 deletions.
2 changes: 2 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -228,3 +228,5 @@ require (
)

replace github.com/containers/common => github.com/mtrmac/common v0.8.2-0.20241015204126-78c8c087610a

replace github.com/containers/image/v5 => github.com/mtrmac/image/v5 v5.0.0-20241016195457-6045533dd9a2
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,6 @@ github.com/containers/conmon v2.0.20+incompatible h1:YbCVSFSCqFjjVwHTPINGdMX1F6J
github.com/containers/conmon v2.0.20+incompatible/go.mod h1:hgwZ2mtuDrppv78a/cOBNiCm6O0UMWGx1mu7P00nu5I=
github.com/containers/gvisor-tap-vsock v0.7.5 h1:bTy4u3DOmmUPwurL6me2rsgfypAFDhyeJleUcQmBR/E=
github.com/containers/gvisor-tap-vsock v0.7.5/go.mod h1:GW9jOqAEEGdaS20XwTYdm6KCYDHIulOE/yEEOabkoE4=
github.com/containers/image/v5 v5.32.3-0.20240923171149-9e1153a28c46 h1:eIwxm8+oAoTk+PDuOTbZRFG1DBF5tAlFO+niIamyzaM=
github.com/containers/image/v5 v5.32.3-0.20240923171149-9e1153a28c46/go.mod h1:GgaW+YZJaJmcGtyPZNtsggfM4BBYIMfu/fFK62ZKU0o=
github.com/containers/libhvee v0.7.1 h1:dWGF5GLq9DZvXo3P8aDp3cNieL5eCaSell4UmeA/jY4=
github.com/containers/libhvee v0.7.1/go.mod h1:fRKB3AyIqHMvq6xaeYhTpckM2cdoq0oecolyoiuLP7M=
github.com/containers/libtrust v0.0.0-20230121012942-c1716e8a8d01 h1:Qzk5C6cYglewc+UyGf6lc8Mj2UaPTHy/iF2De0/77CA=
Expand Down Expand Up @@ -382,6 +380,8 @@ github.com/morikuni/aec v1.0.0 h1:nP9CBfwrvYnBRgY6qfDQkygYDmYwOilePFkwzv4dU8A=
github.com/morikuni/aec v1.0.0/go.mod h1:BbKIizmSmc5MMPqRYbxO4ZU0S0+P200+tUnFx7PXmsc=
github.com/mtrmac/common v0.8.2-0.20241015204126-78c8c087610a h1:xpe1z25rOIfC8CDeWCIB2lCZJcCwW5mKorGXt8PRQCs=
github.com/mtrmac/common v0.8.2-0.20241015204126-78c8c087610a/go.mod h1:GRT29AbW4CdqEWP/jSxHyUvV5fprOzsCdhsFhqJiU4s=
github.com/mtrmac/image/v5 v5.0.0-20241016195457-6045533dd9a2 h1:jv0/6AabBWh1KPQPTD9nefFwVvimQA0K+phljh8mNU8=
github.com/mtrmac/image/v5 v5.0.0-20241016195457-6045533dd9a2/go.mod h1:Ulwf/jQO4757C/uOJyNiZ10dRiXRwVnyhF9wYFno3GQ=
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA=
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ=
github.com/nxadm/tail v1.4.11 h1:8feyoE3OzPrcshW5/MJ4sGESc5cqmGkGCWlco4l0bqY=
Expand Down
16 changes: 8 additions & 8 deletions test/system/120-load.bats
Original file line number Diff line number Diff line change
Expand Up @@ -183,38 +183,38 @@ verify_icd_and_name() {
get_icd_and_name

# Save image by ID, and remove it.
run_podman save $icd -o $archive
run_podman rmi $icd
run_podman save $iid -o $archive
run_podman rmi $iid

# Load using -i; IID should be preserved, but name is not.
run_podman load -i $archive
verify_icd_and_name "<none>:<none>"

# Same as above, using stdin
run_podman rmi $icd
run_podman rmi $iid
run_podman load < $archive
verify_icd_and_name "<none>:<none>"

# Same as above, using stdin but with `podman image load`
run_podman rmi $icd
run_podman rmi $iid
run_podman image load < $archive
verify_icd_and_name "<none>:<none>"
}

@test "podman load - by image name" {
get_icd_and_name
run_podman save $img_name -o $archive
run_podman rmi $icd
run_podman rmi $iid

# Load using -i; this time the image should be tagged.
run_podman load -i $archive
verify_icd_and_name $img_name
run_podman rmi $icd
run_podman rmi $iid

# Also make sure that `image load` behaves the same.
run_podman image load -i $archive
verify_icd_and_name $img_name
run_podman rmi $icd
run_podman rmi $iid

# Same as above, using stdin
run_podman load < $archive
Expand All @@ -224,7 +224,7 @@ verify_icd_and_name() {
@test "podman load - from URL" {
get_icd_and_name
run_podman save $img_name -o $archive
run_podman rmi $icd
run_podman rmi $iid

HOST_PORT=$(random_free_port)
SERVER=http://127.0.0.1:$HOST_PORT
Expand Down
11 changes: 8 additions & 3 deletions vendor/github.com/containers/image/v5/copy/single.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 0 additions & 29 deletions vendor/github.com/containers/image/v5/docker/docker_client.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions vendor/github.com/containers/image/v5/docker/errors.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

24 changes: 22 additions & 2 deletions vendor/github.com/containers/image/v5/internal/private/private.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions vendor/github.com/containers/image/v5/oci/archive/oci_dest.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions vendor/github.com/containers/image/v5/pkg/blobcache/dest.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

31 changes: 21 additions & 10 deletions vendor/github.com/containers/image/v5/signature/policy_config.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 12 additions & 4 deletions vendor/github.com/containers/image/v5/storage/storage_dest.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions vendor/github.com/containers/image/v5/types/types.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ github.com/containers/conmon/runner/config
# github.com/containers/gvisor-tap-vsock v0.7.5
## explicit; go 1.21
github.com/containers/gvisor-tap-vsock/pkg/types
# github.com/containers/image/v5 v5.32.3-0.20240923171149-9e1153a28c46
# github.com/containers/image/v5 v5.32.3-0.20240923171149-9e1153a28c46 => github.com/mtrmac/image/v5 v5.0.0-20241016195457-6045533dd9a2
## explicit; go 1.22.6
github.com/containers/image/v5/copy
github.com/containers/image/v5/directory
Expand Down Expand Up @@ -1385,3 +1385,4 @@ tags.cncf.io/container-device-interface/pkg/parser
## explicit; go 1.19
tags.cncf.io/container-device-interface/specs-go
# github.com/containers/common => github.com/mtrmac/common v0.8.2-0.20241015204126-78c8c087610a
# github.com/containers/image/v5 => github.com/mtrmac/image/v5 v5.0.0-20241016195457-6045533dd9a2

0 comments on commit f0a59b8

Please sign in to comment.