Make the diffs show up in a predictable location.

This commit is contained in:
jakedt 2014-02-17 15:17:39 -05:00
parent 50d130f199
commit bb48f733e2
112 changed files with 16 additions and 206988 deletions

View file

@ -17,6 +17,19 @@ store = app.config['STORAGE']
SAMPLE_DIFFS = ['test/data/sample/diffs/diffs%s.json' % i
for i in range(1, 10)]
IMAGE_UUIDS = ['ab5160d1-8fb4-4022-a135-3c4de7f6ed97',
'4259533e-868d-4db3-9a78-fc24ffc03a2b',
'c2c6dc6e-24d1-4f15-a616-81c41e3e3629',
'8ec59952-8f5a-4fa0-897e-57c3337e1914',
'08a8ab1f-4aaa-4337-88ab-5b5c71a8d492',
'4a71f3db-cbb1-4c3b-858f-1be032b3e875',
'd40d531a-c70c-47f9-bf5b-2a4381db2d60',
'6fe6cebb-52b2-4036-892e-b86d6487a56b',
'e969ff76-e87d-4ea3-8cb3-0db9b5bcb8d9',
'2e3b616b-301f-437c-98ab-37352f444a60',
]
SAMPLE_CMDS = [["/bin/bash"],
["/bin/sh", "-c",
"echo \"PasswordAuthentication no\" >> /etc/ssh/sshd_config"],
@ -55,6 +68,9 @@ def __create_subtree(repo, structure, creator_username, parent):
checksum = __gen_checksum(docker_image_id)
new_image = model.create_or_link_image(docker_image_id, repo, None)
new_image.storage.uuid = IMAGE_UUIDS[image_num % len(IMAGE_UUIDS)]
new_image.storage.save()
model.set_image_checksum(docker_image_id, repo, checksum)
creation_time = REFERENCE_DATE + timedelta(days=image_num)