Give the repos ownership tests a fixed git identity (#790)

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:
lrnselfreliance 2026-10-08 17:01:59 -06:00 • committed by GitHub
parent 184c95e250
commit cb189bacb1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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):