Give the repos ownership tests a fixed git identity

test_ownership.py's git() helper did not use TEST_GIT_ENV, so its commits
read the machine's git identity.  CI runners have none and cannot guess one,
so seven tests failed there on every run.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Roland 2026-10-08 16:43:40 -06:00
parent 184c95e250
commit 1079326ee5
No known key found for this signature in database
GPG key ID: 1BA620CE6C9A4680

View file

@ -1,14 +1,16 @@
import os
import subprocess
import pytest
from modules.repos import lib
from modules.repos.conftest import TEST_GIT_ENV
from wrolpi.downloader import Download, DownloadStatus
def git(directory, *args) -> str:
return subprocess.run(['git', '-c', 'safe.directory=*', *args], cwd=directory, check=True,
capture_output=True).stdout.decode().strip()
env=dict(os.environ, **TEST_GIT_ENV), capture_output=True).stdout.decode().strip()
async def update(test_session, repos_download_manager):