Skip to content

Commit

Permalink
Fix test when run by GH Actions runner
Browse files Browse the repository at this point in the history
  • Loading branch information
rehoumir committed Jul 12, 2024
1 parent 754f1ff commit 5df1803
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@

from project_rossum_deploy.utils.consts import settings

base_url = os.getenv("SOURCE_API_BASE")
username = os.getenv("SOURCE_USERNAME")
password = os.getenv("SOURCE_PASSWORD")
base_url = os.environ.get("SOURCE_API_BASE")
username = os.environ.get("SOURCE_USERNAME")
password = os.environ.get("SOURCE_PASSWORD")


@pytest.fixture
Expand All @@ -25,9 +25,9 @@ def client():
)


target_base_url = os.getenv("TARGET_API_BASE")
target_username = os.getenv("TARGET_USERNAME")
target_password = os.getenv("TARGET_PASSWORD")
target_base_url = os.environ.get("TARGET_API_BASE")
target_username = os.environ.get("TARGET_USERNAME")
target_password = os.environ.get("TARGET_PASSWORD")


@pytest.fixture
Expand Down
2 changes: 2 additions & 0 deletions tests/test_upload.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ async def setup_project(client: ElisAPIClient, tmp_path):
current_path = Path(__file__).parent.parent
os.chdir(tmp_path)
subprocess.run(["git", "init"])
subprocess.run(["git", "config", "user.email", "gh_pipeline_runner"])
subprocess.run(["git", "config", "user.name", "gh_pipeline_runner"])
subprocess.run(["git", "add", "."])
subprocess.run(["git", "commit", "-m", "init"])
os.chdir(current_path)
Expand Down

0 comments on commit 5df1803

Please sign in to comment.