summaryrefslogtreecommitdiffstats
path: root/taskcluster/gecko_taskgraph/test
diff options
context:
space:
mode:
Diffstat (limited to 'taskcluster/gecko_taskgraph/test')
-rw-r--r--taskcluster/gecko_taskgraph/test/automationrelevance.json358
-rw-r--r--taskcluster/gecko_taskgraph/test/conftest.py2
-rw-r--r--taskcluster/gecko_taskgraph/test/test_actions_util.py1
-rw-r--r--taskcluster/gecko_taskgraph/test/test_files_changed.py46
-rw-r--r--taskcluster/gecko_taskgraph/test/test_optimize_strategies.py75
-rw-r--r--taskcluster/gecko_taskgraph/test/test_transforms_job.py2
6 files changed, 88 insertions, 396 deletions
diff --git a/taskcluster/gecko_taskgraph/test/automationrelevance.json b/taskcluster/gecko_taskgraph/test/automationrelevance.json
deleted file mode 100644
index 3bdfa9ed9e..0000000000
--- a/taskcluster/gecko_taskgraph/test/automationrelevance.json
+++ /dev/null
@@ -1,358 +0,0 @@
-{
- "changesets": [
- {
- "author": "James Long <longster@gmail.com>",
- "backsoutnodes": [],
- "bugs": [
- {
- "no": "1300866",
- "url": "https://bugzilla.mozilla.org/show_bug.cgi?id=1300866"
- }
- ],
- "date": [1473196655.0, 14400],
- "desc": "Bug 1300866 - expose devtools require to new debugger r=jlast,bgrins",
- "extra": {
- "branch": "default"
- },
- "files": ["devtools/client/debugger/index.html"],
- "node": "ae2144aa4356b65c2f8c0de8c9082dcb7e330e24",
- "parents": ["37c9349b4e8167a61b08b7e119c21ea177b98942"],
- "perfherderurl": "https://treeherder.mozilla.org/perf.html#/compare?originalProject=mozilla-central&originalRevision=a14f88a9af7a59e677478694bafd9375ac53683e&newProject=mozilla-central&newRevision=ae2144aa4356b65c2f8c0de8c9082dcb7e330e24",
- "pushdate": [1473261248, 0],
- "pushhead": "a14f88a9af7a59e677478694bafd9375ac53683e",
- "pushid": 30664,
- "pushnodes": [
- "ae2144aa4356b65c2f8c0de8c9082dcb7e330e24",
- "73a6a267a50a0e1c41e689b265ad3eebe43d7ac6",
- "16a1a91f9269ab95dd83eb29dc5d0227665f7d94",
- "99c542fa43a72ee863c813b5624048d1b443549b",
- "a6b6a93eb41a05e310a11f0172f01ba9b21d3eac",
- "541c9086c0f27fba60beecc9bc94543103895c86",
- "041a925171e431bf51fb50193ab19d156088c89a",
- "a14f88a9af7a59e677478694bafd9375ac53683e"
- ],
- "pushuser": "cbook@mozilla.com",
- "rev": 312890,
- "reviewers": [
- {
- "name": "jlast",
- "revset": "reviewer(jlast)"
- },
- {
- "name": "bgrins",
- "revset": "reviewer(bgrins)"
- }
- ],
- "treeherderrepo": "mozilla-central",
- "treeherderrepourl": "https://treeherder.mozilla.org/#/jobs?repo=mozilla-central"
- },
- {
- "author": "Wes Kocher <wkocher@mozilla.com>",
- "backsoutnodes": [],
- "bugs": [],
- "date": [1473208638.0, 25200],
- "desc": "Merge m-c to fx-team, a=merge",
- "extra": {
- "branch": "default"
- },
- "files": ["taskcluster/scripts/builder/build-l10n.sh"],
- "node": "73a6a267a50a0e1c41e689b265ad3eebe43d7ac6",
- "parents": [
- "ae2144aa4356b65c2f8c0de8c9082dcb7e330e24",
- "91c2b9d5c1354ca79e5b174591dbb03b32b15bbf"
- ],
- "perfherderurl": "https://treeherder.mozilla.org/perf.html#/compare?originalProject=mozilla-central&originalRevision=a14f88a9af7a59e677478694bafd9375ac53683e&newProject=mozilla-central&newRevision=ae2144aa4356b65c2f8c0de8c9082dcb7e330e24",
- "pushdate": [1473261248, 0],
- "pushhead": "a14f88a9af7a59e677478694bafd9375ac53683e",
- "pushid": 30664,
- "pushnodes": [
- "ae2144aa4356b65c2f8c0de8c9082dcb7e330e24",
- "73a6a267a50a0e1c41e689b265ad3eebe43d7ac6",
- "16a1a91f9269ab95dd83eb29dc5d0227665f7d94",
- "99c542fa43a72ee863c813b5624048d1b443549b",
- "a6b6a93eb41a05e310a11f0172f01ba9b21d3eac",
- "541c9086c0f27fba60beecc9bc94543103895c86",
- "041a925171e431bf51fb50193ab19d156088c89a",
- "a14f88a9af7a59e677478694bafd9375ac53683e"
- ],
- "pushuser": "cbook@mozilla.com",
- "rev": 312891,
- "reviewers": [
- {
- "name": "merge",
- "revset": "reviewer(merge)"
- }
- ],
- "treeherderrepo": "mozilla-central",
- "treeherderrepourl": "https://treeherder.mozilla.org/#/jobs?repo=mozilla-central"
- },
- {
- "author": "Towkir Ahmed <towkir17@gmail.com>",
- "backsoutnodes": [],
- "bugs": [
- {
- "no": "1296648",
- "url": "https://bugzilla.mozilla.org/show_bug.cgi?id=1296648"
- }
- ],
- "date": [1472957580.0, 14400],
- "desc": "Bug 1296648 - Fix direction of .ruleview-expander.theme-twisty in RTL locales. r=ntim",
- "extra": {
- "branch": "default"
- },
- "files": ["devtools/client/themes/rules.css"],
- "node": "16a1a91f9269ab95dd83eb29dc5d0227665f7d94",
- "parents": ["73a6a267a50a0e1c41e689b265ad3eebe43d7ac6"],
- "perfherderurl": "https://treeherder.mozilla.org/perf.html#/compare?originalProject=mozilla-central&originalRevision=a14f88a9af7a59e677478694bafd9375ac53683e&newProject=mozilla-central&newRevision=ae2144aa4356b65c2f8c0de8c9082dcb7e330e24",
- "pushdate": [1473261248, 0],
- "pushhead": "a14f88a9af7a59e677478694bafd9375ac53683e",
- "pushid": 30664,
- "pushnodes": [
- "ae2144aa4356b65c2f8c0de8c9082dcb7e330e24",
- "73a6a267a50a0e1c41e689b265ad3eebe43d7ac6",
- "16a1a91f9269ab95dd83eb29dc5d0227665f7d94",
- "99c542fa43a72ee863c813b5624048d1b443549b",
- "a6b6a93eb41a05e310a11f0172f01ba9b21d3eac",
- "541c9086c0f27fba60beecc9bc94543103895c86",
- "041a925171e431bf51fb50193ab19d156088c89a",
- "a14f88a9af7a59e677478694bafd9375ac53683e"
- ],
- "pushuser": "cbook@mozilla.com",
- "rev": 312892,
- "reviewers": [
- {
- "name": "ntim",
- "revset": "reviewer(ntim)"
- }
- ],
- "treeherderrepo": "mozilla-central",
- "treeherderrepourl": "https://treeherder.mozilla.org/#/jobs?repo=mozilla-central"
- },
- {
- "author": "Oriol <oriol-bugzilla@hotmail.com>",
- "backsoutnodes": [],
- "bugs": [
- {
- "no": "1300336",
- "url": "https://bugzilla.mozilla.org/show_bug.cgi?id=1300336"
- }
- ],
- "date": [1472921160.0, 14400],
- "desc": "Bug 1300336 - Allow pseudo-arrays to have a length property. r=fitzgen",
- "extra": {
- "branch": "default"
- },
- "files": [
- "devtools/client/webconsole/test/browser_webconsole_output_06.js",
- "devtools/server/actors/object.js"
- ],
- "node": "99c542fa43a72ee863c813b5624048d1b443549b",
- "parents": ["16a1a91f9269ab95dd83eb29dc5d0227665f7d94"],
- "perfherderurl": "https://treeherder.mozilla.org/perf.html#/compare?originalProject=mozilla-central&originalRevision=a14f88a9af7a59e677478694bafd9375ac53683e&newProject=mozilla-central&newRevision=ae2144aa4356b65c2f8c0de8c9082dcb7e330e24",
- "pushdate": [1473261248, 0],
- "pushhead": "a14f88a9af7a59e677478694bafd9375ac53683e",
- "pushid": 30664,
- "pushnodes": [
- "ae2144aa4356b65c2f8c0de8c9082dcb7e330e24",
- "73a6a267a50a0e1c41e689b265ad3eebe43d7ac6",
- "16a1a91f9269ab95dd83eb29dc5d0227665f7d94",
- "99c542fa43a72ee863c813b5624048d1b443549b",
- "a6b6a93eb41a05e310a11f0172f01ba9b21d3eac",
- "541c9086c0f27fba60beecc9bc94543103895c86",
- "041a925171e431bf51fb50193ab19d156088c89a",
- "a14f88a9af7a59e677478694bafd9375ac53683e"
- ],
- "pushuser": "cbook@mozilla.com",
- "rev": 312893,
- "reviewers": [
- {
- "name": "fitzgen",
- "revset": "reviewer(fitzgen)"
- }
- ],
- "treeherderrepo": "mozilla-central",
- "treeherderrepourl": "https://treeherder.mozilla.org/#/jobs?repo=mozilla-central"
- },
- {
- "author": "Ruturaj Vartak <ruturaj@gmail.com>",
- "backsoutnodes": [],
- "bugs": [
- {
- "no": "1295010",
- "url": "https://bugzilla.mozilla.org/show_bug.cgi?id=1295010"
- }
- ],
- "date": [1472854020.0, -7200],
- "desc": "Bug 1295010 - Don't move the eyedropper to the out of browser window by keyboard navigation. r=pbro\n\nMozReview-Commit-ID: vBwmSxVNXK",
- "extra": {
- "amend_source": "6885024ef00cfa33d73c59dc03c48ebcda9ccbdd",
- "branch": "default",
- "histedit_source": "c43167f0a7cbe9f4c733b15da726e5150a9529ba",
- "rebase_source": "b74df421630fc46dab6b6cc026bf3e0ae6b4a651"
- },
- "files": [
- "devtools/client/inspector/test/browser_inspector_highlighter-eyedropper-events.js",
- "devtools/client/inspector/test/head.js",
- "devtools/server/actors/highlighters/eye-dropper.js"
- ],
- "node": "a6b6a93eb41a05e310a11f0172f01ba9b21d3eac",
- "parents": ["99c542fa43a72ee863c813b5624048d1b443549b"],
- "perfherderurl": "https://treeherder.mozilla.org/perf.html#/compare?originalProject=mozilla-central&originalRevision=a14f88a9af7a59e677478694bafd9375ac53683e&newProject=mozilla-central&newRevision=ae2144aa4356b65c2f8c0de8c9082dcb7e330e24",
- "pushdate": [1473261248, 0],
- "pushhead": "a14f88a9af7a59e677478694bafd9375ac53683e",
- "pushid": 30664,
- "pushnodes": [
- "ae2144aa4356b65c2f8c0de8c9082dcb7e330e24",
- "73a6a267a50a0e1c41e689b265ad3eebe43d7ac6",
- "16a1a91f9269ab95dd83eb29dc5d0227665f7d94",
- "99c542fa43a72ee863c813b5624048d1b443549b",
- "a6b6a93eb41a05e310a11f0172f01ba9b21d3eac",
- "541c9086c0f27fba60beecc9bc94543103895c86",
- "041a925171e431bf51fb50193ab19d156088c89a",
- "a14f88a9af7a59e677478694bafd9375ac53683e"
- ],
- "pushuser": "cbook@mozilla.com",
- "rev": 312894,
- "reviewers": [
- {
- "name": "pbro",
- "revset": "reviewer(pbro)"
- }
- ],
- "treeherderrepo": "mozilla-central",
- "treeherderrepourl": "https://treeherder.mozilla.org/#/jobs?repo=mozilla-central"
- },
- {
- "author": "Matteo Ferretti <mferretti@mozilla.com>",
- "backsoutnodes": [],
- "bugs": [
- {
- "no": "1299154",
- "url": "https://bugzilla.mozilla.org/show_bug.cgi?id=1299154"
- }
- ],
- "date": [1472629906.0, -7200],
- "desc": "Bug 1299154 - added Set/GetOverrideDPPX to restorefromHistory; r=mstange\n\nMozReview-Commit-ID: AsyAcG3Igbn\n",
- "extra": {
- "branch": "default",
- "committer": "Matteo Ferretti <mferretti@mozilla.com> 1473236511 -7200"
- },
- "files": [
- "docshell/base/nsDocShell.cpp",
- "dom/tests/mochitest/general/test_contentViewer_overrideDPPX.html"
- ],
- "node": "541c9086c0f27fba60beecc9bc94543103895c86",
- "parents": ["a6b6a93eb41a05e310a11f0172f01ba9b21d3eac"],
- "perfherderurl": "https://treeherder.mozilla.org/perf.html#/compare?originalProject=mozilla-central&originalRevision=a14f88a9af7a59e677478694bafd9375ac53683e&newProject=mozilla-central&newRevision=ae2144aa4356b65c2f8c0de8c9082dcb7e330e24",
- "pushdate": [1473261248, 0],
- "pushhead": "a14f88a9af7a59e677478694bafd9375ac53683e",
- "pushid": 30664,
- "pushnodes": [
- "ae2144aa4356b65c2f8c0de8c9082dcb7e330e24",
- "73a6a267a50a0e1c41e689b265ad3eebe43d7ac6",
- "16a1a91f9269ab95dd83eb29dc5d0227665f7d94",
- "99c542fa43a72ee863c813b5624048d1b443549b",
- "a6b6a93eb41a05e310a11f0172f01ba9b21d3eac",
- "541c9086c0f27fba60beecc9bc94543103895c86",
- "041a925171e431bf51fb50193ab19d156088c89a",
- "a14f88a9af7a59e677478694bafd9375ac53683e"
- ],
- "pushuser": "cbook@mozilla.com",
- "rev": 312895,
- "reviewers": [
- {
- "name": "mstange",
- "revset": "reviewer(mstange)"
- }
- ],
- "treeherderrepo": "mozilla-central",
- "treeherderrepourl": "https://treeherder.mozilla.org/#/jobs?repo=mozilla-central"
- },
- {
- "author": "Patrick Brosset <pbrosset@mozilla.com>",
- "backsoutnodes": [],
- "bugs": [
- {
- "no": "1295010",
- "url": "https://bugzilla.mozilla.org/show_bug.cgi?id=1295010"
- }
- ],
- "date": [1473239449.0, -7200],
- "desc": "Bug 1295010 - Removed testActor from highlighterHelper in inspector tests; r=me\n\nMozReview-Commit-ID: GMksl81iGcp",
- "extra": {
- "branch": "default"
- },
- "files": [
- "devtools/client/inspector/test/browser_inspector_highlighter-eyedropper-events.js",
- "devtools/client/inspector/test/head.js"
- ],
- "node": "041a925171e431bf51fb50193ab19d156088c89a",
- "parents": ["541c9086c0f27fba60beecc9bc94543103895c86"],
- "perfherderurl": "https://treeherder.mozilla.org/perf.html#/compare?originalProject=mozilla-central&originalRevision=a14f88a9af7a59e677478694bafd9375ac53683e&newProject=mozilla-central&newRevision=ae2144aa4356b65c2f8c0de8c9082dcb7e330e24",
- "pushdate": [1473261248, 0],
- "pushhead": "a14f88a9af7a59e677478694bafd9375ac53683e",
- "pushid": 30664,
- "pushnodes": [
- "ae2144aa4356b65c2f8c0de8c9082dcb7e330e24",
- "73a6a267a50a0e1c41e689b265ad3eebe43d7ac6",
- "16a1a91f9269ab95dd83eb29dc5d0227665f7d94",
- "99c542fa43a72ee863c813b5624048d1b443549b",
- "a6b6a93eb41a05e310a11f0172f01ba9b21d3eac",
- "541c9086c0f27fba60beecc9bc94543103895c86",
- "041a925171e431bf51fb50193ab19d156088c89a",
- "a14f88a9af7a59e677478694bafd9375ac53683e"
- ],
- "pushuser": "cbook@mozilla.com",
- "rev": 312896,
- "reviewers": [
- {
- "name": "me",
- "revset": "reviewer(me)"
- }
- ],
- "treeherderrepo": "mozilla-central",
- "treeherderrepourl": "https://treeherder.mozilla.org/#/jobs?repo=mozilla-central"
- },
- {
- "author": "Carsten \"Tomcat\" Book <cbook@mozilla.com>",
- "backsoutnodes": [],
- "bugs": [],
- "date": [1473261233.0, -7200],
- "desc": "merge fx-team to mozilla-central a=merge",
- "extra": {
- "branch": "default"
- },
- "files": [],
- "node": "a14f88a9af7a59e677478694bafd9375ac53683e",
- "parents": [
- "3d0b41fdd93bd8233745eadb4e0358e385bf2cb9",
- "041a925171e431bf51fb50193ab19d156088c89a"
- ],
- "perfherderurl": "https://treeherder.mozilla.org/perf.html#/compare?originalProject=mozilla-central&originalRevision=a14f88a9af7a59e677478694bafd9375ac53683e&newProject=mozilla-central&newRevision=ae2144aa4356b65c2f8c0de8c9082dcb7e330e24",
- "pushdate": [1473261248, 0],
- "pushhead": "a14f88a9af7a59e677478694bafd9375ac53683e",
- "pushid": 30664,
- "pushnodes": [
- "ae2144aa4356b65c2f8c0de8c9082dcb7e330e24",
- "73a6a267a50a0e1c41e689b265ad3eebe43d7ac6",
- "16a1a91f9269ab95dd83eb29dc5d0227665f7d94",
- "99c542fa43a72ee863c813b5624048d1b443549b",
- "a6b6a93eb41a05e310a11f0172f01ba9b21d3eac",
- "541c9086c0f27fba60beecc9bc94543103895c86",
- "041a925171e431bf51fb50193ab19d156088c89a",
- "a14f88a9af7a59e677478694bafd9375ac53683e"
- ],
- "pushuser": "cbook@mozilla.com",
- "rev": 312897,
- "reviewers": [
- {
- "name": "merge",
- "revset": "reviewer(merge)"
- }
- ],
- "treeherderrepo": "mozilla-central",
- "treeherderrepourl": "https://treeherder.mozilla.org/#/jobs?repo=mozilla-central"
- }
- ],
- "visible": true
-}
diff --git a/taskcluster/gecko_taskgraph/test/conftest.py b/taskcluster/gecko_taskgraph/test/conftest.py
index ff3d6ce2bd..758d3402b5 100644
--- a/taskcluster/gecko_taskgraph/test/conftest.py
+++ b/taskcluster/gecko_taskgraph/test/conftest.py
@@ -47,7 +47,7 @@ def enable_logging():
@pytest.fixture(scope="session")
def graph_config():
- return load_graph_config(os.path.join(GECKO, "taskcluster", "ci"))
+ return load_graph_config(os.path.join(GECKO, "taskcluster"))
@pytest.fixture(scope="session")
diff --git a/taskcluster/gecko_taskgraph/test/test_actions_util.py b/taskcluster/gecko_taskgraph/test/test_actions_util.py
index 7c38caea57..0838dafc11 100644
--- a/taskcluster/gecko_taskgraph/test/test_actions_util.py
+++ b/taskcluster/gecko_taskgraph/test/test_actions_util.py
@@ -155,6 +155,7 @@ def is_subset(subset, superset):
def test_extract_applicable_action(
responses, monkeypatch, actions_json, task_def, expected
):
+ actions.util.get_task_definition.cache_clear()
base_url = "https://taskcluster"
decision_task_id = "dddd"
task_id = "tttt"
diff --git a/taskcluster/gecko_taskgraph/test/test_files_changed.py b/taskcluster/gecko_taskgraph/test/test_files_changed.py
index 5b9a016649..389dbb4093 100644
--- a/taskcluster/gecko_taskgraph/test/test_files_changed.py
+++ b/taskcluster/gecko_taskgraph/test/test_files_changed.py
@@ -3,14 +3,11 @@
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-import json
-import os
import unittest
from mozunit import main
from gecko_taskgraph import files_changed
-from gecko_taskgraph.util import hg
PARAMS = {
"head_repository": "https://hg.mozilla.org/mozilla-central",
@@ -31,40 +28,17 @@ FILES_CHANGED = [
]
-class FakeResponse:
- def json(self):
- with open(
- os.path.join(os.path.dirname(__file__), "automationrelevance.json")
- ) as f:
- return json.load(f)
-
-
-class TestGetChangedFiles(unittest.TestCase):
- def setUp(self):
- files_changed.get_changed_files.clear()
- self.old_get = hg.requests.get
-
- def fake_get(url, **kwargs):
- return FakeResponse()
-
- hg.requests.get = fake_get
-
- def tearDown(self):
- hg.requests.get = self.old_get
- files_changed.get_changed_files.clear()
-
- def test_get_changed_files(self):
- """Get_changed_files correctly gets the list of changed files in a push.
- This tests against the production hg.mozilla.org so that it will detect
- any changes in the format of the returned data."""
- self.assertEqual(
- sorted(
- files_changed.get_changed_files(
- PARAMS["head_repository"], PARAMS["head_rev"]
- )
- ),
- FILES_CHANGED,
+def test_get_changed_files(responses):
+ url = f"{PARAMS['head_repository']}/json-pushchangedfiles/{PARAMS['head_rev']}"
+ responses.add(responses.GET, url, status=200, json={"files": FILES_CHANGED})
+ assert (
+ sorted(
+ files_changed.get_changed_files(
+ PARAMS["head_repository"], PARAMS["head_rev"]
+ )
)
+ == FILES_CHANGED
+ )
class TestCheck(unittest.TestCase):
diff --git a/taskcluster/gecko_taskgraph/test/test_optimize_strategies.py b/taskcluster/gecko_taskgraph/test/test_optimize_strategies.py
index 1240d71cf8..2c10ba449a 100644
--- a/taskcluster/gecko_taskgraph/test/test_optimize_strategies.py
+++ b/taskcluster/gecko_taskgraph/test/test_optimize_strategies.py
@@ -19,6 +19,7 @@ from gecko_taskgraph.optimize.bugbug import (
DisperseGroups,
SkipUnlessDebug,
)
+from gecko_taskgraph.optimize.mozlint import SkipUnlessMozlint
from gecko_taskgraph.optimize.strategies import SkipUnlessSchedules
from gecko_taskgraph.util.backstop import BACKSTOP_PUSH_INTERVAL
from gecko_taskgraph.util.bugbug import (
@@ -511,5 +512,79 @@ def test_project_autoland_test(monkeypatch, responses, params):
assert scheduled == {"task-0-label", "task-1-label"}
+@pytest.mark.parametrize(
+ "pushed_files,to_lint,expected",
+ [
+ pytest.param(
+ ["a/b/c.txt"],
+ [],
+ True,
+ ),
+ pytest.param(
+ ["python/mozlint/a/support_file.txt", "b/c/d.txt"],
+ ["python/mozlint/a/support_file.txt"],
+ False,
+ ),
+ ],
+ ids=idfn,
+)
+def test_mozlint_should_remove_task(
+ monkeypatch, params, pushed_files, to_lint, expected
+):
+ import mozlint.pathutils
+
+ class MockParser:
+ def __call__(self, *args, **kwargs):
+ return []
+
+ def mock_filterpaths(*args, **kwargs):
+ return to_lint, None
+
+ monkeypatch.setattr(mozlint.pathutils, "filterpaths", mock_filterpaths)
+
+ opt = SkipUnlessMozlint("")
+ monkeypatch.setattr(opt, "mozlint_parser", MockParser())
+ params["files_changed"] = pushed_files
+
+ result = opt.should_remove_task(default_tasks[0], params, "")
+ assert result == expected
+
+
+@pytest.mark.parametrize(
+ "pushed_files,linter_config,expected",
+ [
+ pytest.param(
+ ["a/b/c.txt"],
+ [{"include": ["b/c"]}],
+ True,
+ ),
+ pytest.param(
+ ["a/b/c.txt"],
+ [{"include": ["a/b"], "exclude": ["a/b/c.txt"]}],
+ True,
+ ),
+ pytest.param(
+ ["python/mozlint/a/support_file.txt", "b/c/d.txt"],
+ [{}],
+ False,
+ ),
+ ],
+ ids=idfn,
+)
+def test_mozlint_should_remove_task2(
+ monkeypatch, params, pushed_files, linter_config, expected
+):
+ class MockParser:
+ def __call__(self, *args, **kwargs):
+ return linter_config
+
+ opt = SkipUnlessMozlint("")
+ monkeypatch.setattr(opt, "mozlint_parser", MockParser())
+ params["files_changed"] = pushed_files
+
+ result = opt.should_remove_task(default_tasks[0], params, "")
+ assert result == expected
+
+
if __name__ == "__main__":
main()
diff --git a/taskcluster/gecko_taskgraph/test/test_transforms_job.py b/taskcluster/gecko_taskgraph/test/test_transforms_job.py
index b032307ea6..6161a36054 100644
--- a/taskcluster/gecko_taskgraph/test/test_transforms_job.py
+++ b/taskcluster/gecko_taskgraph/test/test_transforms_job.py
@@ -37,7 +37,7 @@ TASK_DEFAULTS = {
@pytest.fixture(scope="module")
def config():
- graph_config = load_graph_config(os.path.join(GECKO, "taskcluster", "ci"))
+ graph_config = load_graph_config(os.path.join(GECKO, "taskcluster"))
params = FakeParameters(
{
"base_repository": "http://hg.example.com",