Add testinfra for registry.zuul-ci.org
This tests some canary URLs for the registry. Full functional testing is handled by a test playbook. Change-Id: I9a19709df6711e5f4dea21906608c34ac3e8a2b4
This commit is contained in:
parent
e701fdd3ca
commit
e00f4e59b3
@ -236,3 +236,27 @@ def test_ci_openstack_org(host, path, target):
|
||||
' https://ci.openstack.org%s' % path)
|
||||
assert '301 Moved Permanently' in cmd.stdout
|
||||
assert target in cmd.stdout
|
||||
|
||||
def test_registry_zuul_ci_org(host):
|
||||
# The functional test does an actual pull; here we just check some
|
||||
# specific URLs work. In particular, we want to make sure that we
|
||||
# don't proxy /v2/.
|
||||
|
||||
cmd = host.run('curl --resolve registry.zuul-ci.org:443:127.0.0.1'
|
||||
' https://registry.zuul-ci.org/v2/')
|
||||
assert '301 Moved Permanently' not in cmd.stdout
|
||||
assert '302 Found' not in cmd.stdout
|
||||
assert cmd.stdout.strip() == ""
|
||||
|
||||
cmd = host.run('curl --resolve registry.zuul-ci.org:443:127.0.0.1'
|
||||
' -I https://registry.zuul-ci.org/v2/zuul/manifests/8.2.0')
|
||||
assert '302 Found' in cmd.stdout
|
||||
assert 'Location: https://quay.io/v2/corvus/zuul/manifests/8.2.0' in cmd.stdout
|
||||
|
||||
cmd = host.run('curl --resolve registry.zuul-ci.org:443:127.0.0.1'
|
||||
' https://registry.zuul-ci.org/v2/zuul/blobs/'
|
||||
'sha256:5dda314a937ad03f8beac81c714da74e459b6174301368e0903ef586a68ae150')
|
||||
assert '302 Found' in cmd.stdout
|
||||
assert ('https://quay.io/v2/corvus/zuul/blobs/'
|
||||
'sha256:5dda314a937ad03f8beac81c714da74e459b6174301368e0903ef586a68ae150'
|
||||
in cmd.stdout)
|
||||
|
Loading…
x
Reference in New Issue
Block a user