Fix verbs in manifestlist
All registry_tests now pass
This commit is contained in:
parent
783c9e7a73
commit
3c8b87e086
18 changed files with 517 additions and 247 deletions
|
@ -1,11 +1,11 @@
|
|||
import unittest
|
||||
import time
|
||||
import hashlib
|
||||
|
||||
from app import app, storage, docker_v2_signing_key
|
||||
from initdb import setup_database_for_testing, finished_database_for_testing
|
||||
from data import model, database
|
||||
from endpoints.v2.manifest import _write_manifest_itself, SignedManifestBuilder
|
||||
from endpoints.v2.manifest import _write_manifest
|
||||
from image.docker.schema1 import DockerSchema1ManifestBuilder
|
||||
|
||||
|
||||
ADMIN_ACCESS_USER = 'devtable'
|
||||
|
@ -69,11 +69,11 @@ class TestManifests(unittest.TestCase):
|
|||
model.blob.store_blob_record_and_temp_link(ADMIN_ACCESS_USER, REPO, first_blob_sha, location, 0, 0, 0)
|
||||
|
||||
# Push the first manifest.
|
||||
first_manifest = (SignedManifestBuilder(ADMIN_ACCESS_USER, REPO, FIRST_TAG)
|
||||
first_manifest = (DockerSchema1ManifestBuilder(ADMIN_ACCESS_USER, REPO, FIRST_TAG)
|
||||
.add_layer(first_blob_sha, '{"id": "first"}')
|
||||
.build(docker_v2_signing_key))
|
||||
|
||||
_write_manifest_itself(ADMIN_ACCESS_USER, REPO, first_manifest)
|
||||
_write_manifest(ADMIN_ACCESS_USER, REPO, first_manifest)
|
||||
|
||||
# Delete all temp tags and perform GC.
|
||||
self._perform_cleanup()
|
||||
|
@ -91,12 +91,12 @@ class TestManifests(unittest.TestCase):
|
|||
model.blob.store_blob_record_and_temp_link(ADMIN_ACCESS_USER, REPO, third_blob_sha, location, 0, 0, 0)
|
||||
|
||||
# Push the second manifest.
|
||||
second_manifest = (SignedManifestBuilder(ADMIN_ACCESS_USER, REPO, SECOND_TAG)
|
||||
second_manifest = (DockerSchema1ManifestBuilder(ADMIN_ACCESS_USER, REPO, SECOND_TAG)
|
||||
.add_layer(third_blob_sha, '{"id": "second", "parent": "first"}')
|
||||
.add_layer(second_blob_sha, '{"id": "first"}')
|
||||
.build(docker_v2_signing_key))
|
||||
|
||||
_write_manifest_itself(ADMIN_ACCESS_USER, REPO, second_manifest)
|
||||
_write_manifest(ADMIN_ACCESS_USER, REPO, second_manifest)
|
||||
|
||||
# Delete all temp tags and perform GC.
|
||||
self._perform_cleanup()
|
||||
|
@ -120,12 +120,12 @@ class TestManifests(unittest.TestCase):
|
|||
model.blob.store_blob_record_and_temp_link(ADMIN_ACCESS_USER, REPO, fourth_blob_sha, location, 0, 0, 0)
|
||||
|
||||
# Push the third manifest.
|
||||
third_manifest = (SignedManifestBuilder(ADMIN_ACCESS_USER, REPO, THIRD_TAG)
|
||||
third_manifest = (DockerSchema1ManifestBuilder(ADMIN_ACCESS_USER, REPO, THIRD_TAG)
|
||||
.add_layer(third_blob_sha, '{"id": "second", "parent": "first"}')
|
||||
.add_layer(fourth_blob_sha, '{"id": "first"}') # Note the change in BLOB from the second manifest.
|
||||
.build(docker_v2_signing_key))
|
||||
|
||||
_write_manifest_itself(ADMIN_ACCESS_USER, REPO, third_manifest)
|
||||
_write_manifest(ADMIN_ACCESS_USER, REPO, third_manifest)
|
||||
|
||||
# Delete all temp tags and perform GC.
|
||||
self._perform_cleanup()
|
||||
|
|
Reference in a new issue