Skip to content

Commit

Permalink
♻️ Fix agent tests (#6772)
Browse files Browse the repository at this point in the history
  • Loading branch information
giancarloromeo authored Nov 20, 2024
1 parent a0b8a2f commit 66a492f
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
from typing import Any, Protocol, runtime_checkable

from pydantic import AnyHttpUrl, TypeAdapter
from pydantic import TypeAdapter
from typing_extensions import ( # https://docs.pydantic.dev/latest/api/standard_library_types/#typeddict
TypedDict,
)
Expand Down
2 changes: 1 addition & 1 deletion services/agent/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def mock_environment(
"LOGLEVEL": "DEBUG",
"SC_BOOT_MODE": BootModeEnum.DEBUG,
"AGENT_VOLUMES_CLEANUP_TARGET_SWARM_STACK_NAME": swarm_stack_name,
"AGENT_VOLUMES_CLEANUP_S3_ENDPOINT": mocked_s3_server_url,
"AGENT_VOLUMES_CLEANUP_S3_ENDPOINT": f"{mocked_s3_server_url}",
"AGENT_VOLUMES_CLEANUP_S3_ACCESS_KEY": "xxx",
"AGENT_VOLUMES_CLEANUP_S3_SECRET_KEY": "xxx",
"AGENT_VOLUMES_CLEANUP_S3_BUCKET": bucket,
Expand Down
2 changes: 1 addition & 1 deletion services/agent/tests/unit/test_services_backup.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ async def test_backup_volume(

expected_files = _FILES_TO_CREATE_IN_VOLUME * len(VOLUMES_TO_CREATE)

async with session.client("s3", endpoint_url=settings.AGENT_VOLUMES_CLEANUP_S3_ENDPOINT) as s3_client: # type: ignore
async with session.client("s3", endpoint_url=f"{settings.AGENT_VOLUMES_CLEANUP_S3_ENDPOINT}") as s3_client: # type: ignore
list_response = await s3_client.list_objects_v2(
Bucket=settings.AGENT_VOLUMES_CLEANUP_S3_BUCKET,
Prefix=f"{swarm_stack_name}/{project_id}/{node_id}/{run_id}",
Expand Down

0 comments on commit 66a492f

Please sign in to comment.