Skip to content

Commit 8589eb4

Browse files
committed
minor
1 parent 2a1a3e0 commit 8589eb4

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

packages/aws-library/tests/test_ec2_client.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
)
2727
from faker import Faker
2828
from moto.server import ThreadedMotoServer
29+
from pydantic import TypeAdapter
2930
from pytest_mock import MockerFixture
3031
from settings_library.ec2 import EC2Settings
3132
from types_aiobotocore_ec2 import EC2Client
@@ -531,7 +532,8 @@ async def test_set_instance_tags(
531532

532533
# now remove some, this should do nothing
533534
await simcore_ec2_api.remove_instances_tags(
534-
created_instances, tag_keys=[AWSTagKey("whatever_i_dont_exist")]
535+
created_instances,
536+
tag_keys=[TypeAdapter(AWSTagKey).validate_python("whatever_i_dont_exist")],
535537
)
536538
await _assert_instances_in_ec2(
537539
ec2_client,
@@ -589,7 +591,6 @@ async def test_launch_instances_with_multi_subnets(
589591
aws_security_group_id: str,
590592
aws_ami_id: str,
591593
):
592-
"""Test that launch_instances uses multiple valid subnets correctly."""
593594
await _assert_no_instances_in_ec2(ec2_client)
594595

595596
# Create additional valid subnets for testing
@@ -608,8 +609,6 @@ async def test_launch_instances_with_multi_subnets(
608609
iam_instance_profile="",
609610
)
610611

611-
# TODO: simulate InsufficientInstanceCapacity on the first subnet only
612-
613612
# This should succeed using one of the valid subnets
614613
instances = await simcore_ec2_api.launch_instances(
615614
ec2_instance_config,

packages/pytest-simcore/src/pytest_simcore/aws_ec2_service.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ async def aws_vpc_id(
6060
print(f"<-- Deleted Vpc in AWS with {vpc_id=}")
6161

6262

63+
@pytest.fixture
6364
def create_subnet_cidr_block(faker: Faker) -> Callable[[], str]:
6465
def _() -> str:
6566
return faker.ipv4_public(network=True)

0 commit comments

Comments
 (0)