crane: update test to avoid Docker Hub (#69330)
Docker Hub has a very low IP-based rate limit: https://docs.docker.com/docker-hub/download-rate-limit/ To avoid hitting that limit, we'll point this `crane manifest` test at `gcr.io/go-containerregistry/crane`, as GCR has much more generous rate limiting. Further, the gcr.io/go-containerregistry/crane repository is under the control of the authors of crane, so we will be able to anticipate any issues with this test. I've removed the mediaType check from this test, as it is likely to break in the future when we migrate to OCI-based media types. The schemaVersion MUST be 2 for both docker manifests and OCI manifests, so this test should continue working for quite a while.master
parent
dc17bb5e71
commit
a64010709b
|
@ -22,9 +22,8 @@ class Crane < Formula
|
|||
end
|
||||
|
||||
test do
|
||||
json_output = shell_output("#{bin}/crane manifest homebrew/brew")
|
||||
json_output = shell_output("#{bin}/crane manifest gcr.io/go-containerregistry/crane")
|
||||
manifest = JSON.parse(json_output)
|
||||
assert_equal manifest["schemaVersion"], 2
|
||||
assert_equal manifest["config"]["mediaType"], "application/vnd.docker.container.image.v1+json"
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue