Reconcile Gitea Actions failure with order-stable runtime checks
This commit is contained in:
@@ -177,7 +177,7 @@ class ActionsEnableTests(unittest.TestCase):
|
||||
self.assertNotIn(secret, data + output.getvalue())
|
||||
self.assertIn("actions-disabled-or-route", data)
|
||||
|
||||
def full_apply(self, fail_acceptance=False):
|
||||
def full_apply(self, fail_acceptance=False, version="v1"):
|
||||
host = self.root / "host"
|
||||
host.mkdir()
|
||||
paths = {name: host / name.lower() for name in (
|
||||
@@ -196,7 +196,12 @@ class ActionsEnableTests(unittest.TestCase):
|
||||
"compose_root": legacy, "compose_files": (legacy / "compose.yaml",),
|
||||
"compose_env_file": legacy / "production.env"}
|
||||
artifact = paths["INBOX"] / "actions.tgz"
|
||||
artifact.write_bytes(build_actions_artifact.bundle("gitea-actions-enable-v1-full-test"))
|
||||
artifact.write_bytes(build_actions_artifact.bundle("gitea-actions-enable-" + version + "-full-test"))
|
||||
if version == "v2":
|
||||
(root / RUNNER.GITEA_ACTIONS_ENTRY).parent.mkdir(parents=True)
|
||||
(root / RUNNER.GITEA_ACTIONS_ENTRY).write_bytes(b"preserved failed-attempt marker")
|
||||
self.before.update({"fingerprint": RUNNER.gitea_actions_fingerprint_v2(self.info),
|
||||
"fingerprintVersion": 2, "mutationStarted": False})
|
||||
with ExitStack() as stack:
|
||||
for name, value in paths.items():
|
||||
stack.enter_context(mock.patch.object(RUNNER, name, value))
|
||||
|
||||
Reference in New Issue
Block a user