Skip to content

Commit

Permalink
fix(test): set log location in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
n-dusan committed Oct 29, 2023
1 parent 7278238 commit 8d4d28e
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion upgrade/scripts/manage_venv.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def upgrade_venv(
if is_development_cloudsmith(cloudsmith_url):
upgrade_args.append("'--pre'")
else:
upgrade_args.append(f'--version="{requirements_obj.specifier}"')
upgrade_args.append(f"--version={str(requirements_obj.specifier)}")

if log_location:
upgrade_args.append(f"--log-location={log_location}")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,11 @@ def test_build_and_upgrade_venv_where_v2_0_0_venv_exists_and_auto_upgrade_is_ena
dependency_to_install,
envs_home,
auto_upgrade=True,
cloudsmith_url="",
cloudsmith_url="cloudsmith_url",
wheels_path=str(wheels_dir),
update_from_local_wheels=True,
blue_green_deployment=False,
log_location=Path(envs_home, "manage_venv.log"),
)

venv_path = Path(envs_home, dependency_to_install)
Expand Down Expand Up @@ -57,9 +59,10 @@ def test_build_and_upgrade_venv_where_v2_0_1_venv_exists_and_auto_upgrade_is_dis
dependency_to_install,
envs_home,
auto_upgrade=False,
cloudsmith_url="",
cloudsmith_url="cloudsmith_url",
wheels_path=str(wheels_dir),
update_from_local_wheels=True,
log_location=Path(envs_home, "manage_venv.log"),
)
out, _ = capfd.readouterr()

Expand All @@ -83,6 +86,7 @@ def test_build_and_upgrade_venv_where_v2_0_1_venv_exists_and_auto_upgrade_is_ena
cloudsmith_url="cloudsmith_url",
wheels_path=str(wheels_dir),
update_from_local_wheels=True,
log_location=Path(envs_home, "manage_venv.log"),
)

venv_path = Path(envs_home, dependency_to_install)
Expand Down
2 changes: 2 additions & 0 deletions upgrade/tests/manage_venv/test_build_and_upgrade_new_venv.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ def test_build_and_upgrade_venv_where_venv_did_not_exist_and_auto_upgrade_is_dis
cloudsmith_url="cloudsmith_url",
wheels_path=str(wheels_dir),
update_from_local_wheels=True,
blue_green_deployment=False,
log_location=Path(envs_home, "manage_venv.log"),
)
venv_path = Path(envs_home, dependency_to_install)

Expand Down

0 comments on commit 8d4d28e

Please sign in to comment.