Merge pull request #1659 from aptly-dev/fix/tmp-suffix

publish s3: remove tmp suffix for testing
This commit is contained in:
André Roth authored and GitHub committed 2026-11-01 17:03:11 +01:00
commit 0b55b09eb2
2 files changed
+9

No files matched your search

+5
View File
@@ -25,6 +25,11 @@ from pathlib import Path
from uuid import uuid4
def remove_tmp_suffix(_, output):
"""Normalize .tmp.<uuid> suffixes to .tmp for deterministic golden output."""
return re.sub(r'(\.tmp)\.[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}', r'\1', output)
def ungzip_if_required(output):
if isinstance(output, bytes) and output.startswith(b"\x1f\x8b"):
return zlib.decompress(output, 16 + zlib.MAX_WBITS).decode('utf-8')
+4
View File
@@ -1,3 +1,4 @@
from lib import remove_tmp_suffix
from s3_lib import S3Test
@@ -55,6 +56,7 @@ class S3Publish2Test(S3Test):
"aptly repo remove local-repo pyspi"
]
sortOutput = True
outputMatchPrepare = remove_tmp_suffix
runCmd = "aptly publish update -keyring=${files}/aptly.pub -secret-keyring=${files}/aptly.sec maverick s3:test1:"
def check(self):
@@ -96,6 +98,7 @@ class S3Publish3Test(S3Test):
"aptly publish snapshot -keyring=${files}/aptly.pub -secret-keyring=${files}/aptly.sec -distribution=maverick snap1 s3:test1:",
]
sortOutput = True
outputMatchPrepare = remove_tmp_suffix
runCmd = "aptly publish switch -keyring=${files}/aptly.pub -secret-keyring=${files}/aptly.sec maverick s3:test1: snap3"
def check(self):
@@ -178,6 +181,7 @@ class S3Publish6Test(S3Test):
"aptly repo remove local-repo pyspi"
]
sortOutput = True
outputMatchPrepare = remove_tmp_suffix
runCmd = "aptly publish update -keyring=${files}/aptly.pub -secret-keyring=${files}/aptly.sec maverick s3:test1:"
def check(self):