From 3b5d49ab433f9844c5c174d974424d038ec67449 Mon Sep 17 00:00:00 2001 From: Patrick Roy Date: Mon, 11 Nov 2024 13:17:02 +0000 Subject: [PATCH] fix: dont hardcode "main" in gitlint test Hardcoding main means the test looks at the wrong range of commits for feature branches, which can result in problem if feature branches are long-lived. Signed-off-by: Patrick Roy --- tests/integration_tests/style/test_gitlint.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/integration_tests/style/test_gitlint.py b/tests/integration_tests/style/test_gitlint.py index b47286d33e9..b7ef8631327 100644 --- a/tests/integration_tests/style/test_gitlint.py +++ b/tests/integration_tests/style/test_gitlint.py @@ -5,6 +5,7 @@ import os from framework import utils +from framework.ab_test import DEFAULT_A_REVISION def test_gitlint(): @@ -15,6 +16,6 @@ def test_gitlint(): os.environ["LANG"] = "C.UTF-8" rc, _, stderr = utils.run_cmd( - "gitlint --commits origin/main..HEAD -C ../.gitlint --extra-path framework/gitlint_rules.py", + f"gitlint --commits origin/{DEFAULT_A_REVISION}..HEAD -C ../.gitlint --extra-path framework/gitlint_rules.py", ) assert rc == 0, "Commit message violates gitlint rules: {}".format(stderr)