Skip to content

Commit 5cb6143

Browse files
committed
improve test and mimick what AWS really does
1 parent 26c446d commit 5cb6143

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/aws-library/tests/test_ec2_client.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -624,7 +624,7 @@ async def mock_run_instances(*args, **kwargs) -> Any:
624624
error_response: dict[str, Any] = {
625625
"Error": {
626626
"Code": "500",
627-
"Message": "Insufficient capacity.",
627+
"Message": "An error occurred (InsufficientInstanceCapacity) when calling the RunInstances operation (reached max retries: 4): We currently do not have sufficient g4dn.4xlarge capacity in the Availability Zone you requested (us-east-1a). Our system will be working on provisioning additional capacity. You can currently get g4dn.4xlarge capacity by not specifying an Availability Zone in your request or choosing us-east-1b, us-east-1c, us-east-1d, us-east-1f",
628628
},
629629
}
630630
raise botocore.exceptions.ClientError(error_response, "RunInstances") # type: ignore
@@ -708,7 +708,7 @@ async def mock_run_instances(*args, **kwargs) -> Any:
708708
error_response = {
709709
"Error": {
710710
"Code": "500",
711-
"Message": "Insufficient capacity.",
711+
"Message": "An error occurred (InsufficientInstanceCapacity) when calling the RunInstances operation (reached max retries: 4): We currently do not have sufficient g4dn.4xlarge capacity in the Availability Zone you requested (us-east-1a). Our system will be working on provisioning additional capacity. You can currently get g4dn.4xlarge capacity by not specifying an Availability Zone in your request or choosing us-east-1b, us-east-1c, us-east-1d, us-east-1f",
712712
},
713713
}
714714
raise botocore.exceptions.ClientError(error_response, "RunInstances") # type: ignore
@@ -785,7 +785,7 @@ async def mock_run_instances(*args, **kwargs):
785785
error_response = {
786786
"Error": {
787787
"Code": "500",
788-
"Message": "Insufficient capacity.",
788+
"Message": "An error occurred (InsufficientInstanceCapacity) when calling the RunInstances operation (reached max retries: 4): We currently do not have sufficient g4dn.4xlarge capacity in the Availability Zone you requested (us-east-1a). Our system will be working on provisioning additional capacity. You can currently get g4dn.4xlarge capacity by not specifying an Availability Zone in your request or choosing us-east-1b, us-east-1c, us-east-1d, us-east-1f",
789789
},
790790
}
791791
raise botocore.exceptions.ClientError(error_response, "RunInstances") # type: ignore

0 commit comments

Comments
 (0)