Make spec'ed tests stable across runs

This was preventing us from running tests in parallel, since the names were changing
This commit is contained in:
Joseph Schorr 2018-06-01 17:06:43 -04:00
parent 7f21d0da58
commit 65f08c25cf

View file

@ -2,7 +2,6 @@ import json
import hashlib
from flask import url_for
from uuid import uuid4
from base64 import b64encode
@ -27,19 +26,19 @@ ORG_OWNERS = 'owners'
ORG_READERS = 'readers'
FAKE_MANIFEST = 'unknown_tag'
FAKE_DIGEST = 'sha256:' + hashlib.sha256(str(uuid4())).hexdigest()
FAKE_IMAGE_ID = str(uuid4())
FAKE_UPLOAD_ID = str(uuid4())
FAKE_TAG_NAME = str(uuid4())
FAKE_USERNAME = str(uuid4())
FAKE_TOKEN = str(uuid4())
FAKE_WEBHOOK = str(uuid4())
FAKE_DIGEST = 'sha256:' + hashlib.sha256('fake').hexdigest()
FAKE_IMAGE_ID = 'fake-image'
FAKE_UPLOAD_ID = 'fake-upload'
FAKE_TAG_NAME = 'fake-tag'
FAKE_USERNAME = 'fakeuser'
FAKE_TOKEN = 'fake-token'
FAKE_WEBHOOK = 'fake-webhook'
BUILD_UUID = '123'
TRIGGER_UUID = '123'
NEW_ORG_REPO_DETAILS = {
'repository': str(uuid4()),
'repository': 'fake-repository',
'visibility': 'private',
'description': '',
'namespace': ORG,
@ -69,7 +68,7 @@ CHANGE_PERMISSION_DETAILS = {
}
CREATE_BUILD_DETAILS = {
'file_id': str(uuid4()),
'file_id': 'fake-file-id',
}
CHANGE_VISIBILITY_DETAILS = {