From 65f08c25cf9d8e5aee708893ebb3d7eeb340aef7 Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Fri, 1 Jun 2018 17:06:43 -0400 Subject: [PATCH] Make spec'ed tests stable across runs This was preventing us from running tests in parallel, since the names were changing --- test/specs.py | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/test/specs.py b/test/specs.py index 54d6d8c64..0590715a8 100644 --- a/test/specs.py +++ b/test/specs.py @@ -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 = {