File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
pytest-simcore/src/pytest_simcore Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change 2626)
2727from faker import Faker
2828from moto .server import ThreadedMotoServer
29+ from pydantic import TypeAdapter
2930from pytest_mock import MockerFixture
3031from settings_library .ec2 import EC2Settings
3132from 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 ,
Original file line number Diff line number Diff 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
6364def create_subnet_cidr_block (faker : Faker ) -> Callable [[], str ]:
6465 def _ () -> str :
6566 return faker .ipv4_public (network = True )
You can’t perform that action at this time.
0 commit comments