mirror of
https://github.com/lrnselfreliance/wrolpi.git
synced 2026-10-25 18:40:06 -04:00
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:
parent
184c95e250
commit
cb189bacb1
1 changed files with 3 additions and 1 deletions
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue