launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #24570
[Merge] ~ilasc/launchpad:add-timestamp-oci-status-OK-normal-image into launchpad:master
Ioana Lasc has proposed merging ~ilasc/launchpad:add-timestamp-oci-status-OK-normal-image into launchpad:master.
Commit message:
Add timestamp to getUploadDirLeaf call
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~ilasc/launchpad/+git/launchpad/+merge/381818
Small change to test_handleStatus_OK_normal_image on
TestHandleStatusForOCIRecipeBuild: added timestamp to
getUploadDirLeaf on the BuildFarmJobBehaviourBase will
lookup the upload folder by the current timestamp
unless the timestamp is passed in where we expect
layer 1 files to be.
--
Your team Launchpad code reviewers is requested to review the proposed merge of ~ilasc/launchpad:add-timestamp-oci-status-OK-normal-image into launchpad:master.
diff --git a/lib/lp/oci/tests/test_ocirecipebuildbehaviour.py b/lib/lp/oci/tests/test_ocirecipebuildbehaviour.py
index 1d9328b..fceb87e 100644
--- a/lib/lp/oci/tests/test_ocirecipebuildbehaviour.py
+++ b/lib/lp/oci/tests/test_ocirecipebuildbehaviour.py
@@ -488,6 +488,7 @@ class TestHandleStatusForOCIRecipeBuild(MakeOCIBuildMixin,
yield self.behaviour.handleStatus(
self.build.buildqueue_record, 'OK',
{'filemap': self.filemap})
+ timestamp = datetime.now()
self.assertEqual(
['buildlog', 'manifest_hash', 'digests_hash', 'config_1_hash',
'layer_2_hash'],
@@ -501,7 +502,8 @@ class TestHandleStatusForOCIRecipeBuild(MakeOCIBuildMixin,
layer_1_path = os.path.join(
self.upload_root,
"incoming",
- self.behaviour.getUploadDirLeaf(self.build.build_cookie),
+ self.behaviour.getUploadDirLeaf(self.build.build_cookie,
+ now=timestamp),
str(self.build.archive.id),
self.build.distribution.name,
"layer_1.tar.gz"