mirror of
https://github.com/rustfs/rustfs.git
synced 2026-09-09 05:36:24 +00:00
test(scanner): require two-hour measured ABBA windows (#7493)
Reject measured Scanner/Heal release ABBA manifests and summaries whose evidence window is shorter than the W21 two-hour release requirement. Co-authored-by: zhi22915 <qiuzgang@gmail.com>
This commit is contained in:
@@ -167,7 +167,7 @@ class ScannerAbbaTest(unittest.TestCase):
|
||||
|
||||
def measured_manifest(self):
|
||||
manifest = copy.deepcopy(self.manifest)
|
||||
manifest.update(evidence="measured", duration_seconds=900)
|
||||
manifest.update(evidence="measured", duration_seconds=harness.MIN_MEASURED_RELEASE_DURATION_SECONDS)
|
||||
candidate_binary = self.root / "candidate-python"
|
||||
candidate_binary.write_bytes(self.binary.read_bytes() + b"\n")
|
||||
candidate_binary.chmod(0o755)
|
||||
@@ -534,7 +534,7 @@ class ScannerAbbaTest(unittest.TestCase):
|
||||
self.manifest["evidence"] = "measured"
|
||||
with self.assertRaisesRegex(ValueError, "duration_seconds"):
|
||||
harness.validate_manifest(self.manifest)
|
||||
self.manifest["duration_seconds"] = 900
|
||||
self.manifest["duration_seconds"] = harness.MIN_MEASURED_RELEASE_DURATION_SECONDS
|
||||
self.manifest["rounds"] = 2
|
||||
with self.assertRaisesRegex(ValueError, "rounds"):
|
||||
harness.validate_manifest(self.manifest)
|
||||
|
||||
Reference in New Issue
Block a user