Skip to content

Commit 9ae1398

Browse files
committed
Fix tests
1 parent ca077eb commit 9ae1398

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

tools/ci/tc/decision.py

-1
Original file line numberDiff line numberDiff line change
@@ -273,7 +273,6 @@ def get_event(queue, event_path):
273273

274274

275275
def decide(event):
276-
print(here)
277276
all_tasks = taskgraph.load_tasks_from_path(os.path.join(here, "tasks", "test.yml"))
278277

279278
triggered_tasks = filter_triggers(event, all_tasks)

tools/ci/tc/tests/test_valid.py

+5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import json
22
import os
3+
import subprocess
34

45
import jsone
56
import mock
@@ -49,6 +50,10 @@ def test_verify_payload():
4950
for filename in ["pr_event.json", "master_push_event.json"]:
5051
with open(data_path(filename)) as f:
5152
event = json.load(f)
53+
54+
# Ensure we have the after commit available
55+
subprocess.check_call(["git", "fetch", event["repository"]["clone_url"], event["after"]])
56+
5257
with mock.patch("tools.ci.tc.decision.get_fetch_rev", return_value=event["after"]):
5358
task_id_map = decide(event)
5459
for name, (task_id, task_data) in task_id_map.items():

0 commit comments

Comments
 (0)