From 6fbd7c7355b2176bea8a2474c4dc1b232a681253 Mon Sep 17 00:00:00 2001 From: Andreea Florescu Date: Fri, 26 Aug 2022 11:50:52 +0300 Subject: [PATCH] fix test commit format The newer versions of git are checking the ownership of directories. Since the `/workdir` is a shared directory with ownership of buildkite, we need to add an exception for it. Signed-off-by: Andreea Florescu --- integration_tests/test_commit_format.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/integration_tests/test_commit_format.py b/integration_tests/test_commit_format.py index d8e0746..5f789ba 100644 --- a/integration_tests/test_commit_format.py +++ b/integration_tests/test_commit_format.py @@ -34,6 +34,11 @@ def test_commit_format(): 60 characters for the title and 75 characters for description lines) and if commits are signed. """ + # Newer versions of git check the ownership of directories. + # We need to add an exception for /workdir which is shared, so that + # the git commands don't fail. + config_cmd = "git config --global --add safe.directory /workdir" + subprocess.run(config_cmd, shell=True, check=True) # Fetch the upstream repository. fetch_base_cmd = "git fetch {} {}".format(REMOTE, BASE_BRANCH) try: