Merge pull request #1996 from coreos-inc/aci-con-test-fix

Add a sleep to fix ACI conversion tests
This commit is contained in:
josephschorr 2016-10-14 16:25:57 -04:00 committed by GitHub
commit b4dd04cca4

View file

@ -38,7 +38,7 @@ from endpoints.csrf import generate_csrf_token
from endpoints.v1 import v1_bp
from endpoints.v2 import v2_bp
from endpoints.verbs import verbs
from image.docker.schema1 import DockerSchema1ManifestBuilder, DockerSchema1Manifest
from image.docker.schema1 import DockerSchema1ManifestBuilder
from initdb import wipe_database, initialize_database, populate_database
from jsonschema import validate as validate_schema
from util.security.registry_jwt import decode_bearer_header
@ -1927,6 +1927,9 @@ class ACIConversionTests(RegistryTestCaseMixin, V1RegistryPushMixin, LiveServerT
# new generation of the image.
self.conduct('POST', '/__test/clearderivedcache')
# Ensures the generated signature will be different.
time.sleep(1)
_, converted_again = self.get_converted_image()
second_hash = hashlib.sha256(converted_again).hexdigest()
self.assertEquals(second_hash, first_hash)