Skip to content

Commit f829e69

Browse files
K8s tests: Add requires_in_process marker in only_localstack tests where needed (#13303)
1 parent 6f99276 commit f829e69

File tree

20 files changed

+79
-0
lines changed

20 files changed

+79
-0
lines changed

tests/aws/services/acm/test_acm.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ def _cert_has_required_fields() -> bool:
8585
result = aws_client.acm.describe_certificate(CertificateArn=certificate_arn)
8686
snapshot.match("describe-certificate", result)
8787

88+
@markers.requires_in_process
8889
@markers.aws.needs_fixing
8990
def test_boto_wait_for_certificate_validation(
9091
self, acm_request_certificate, aws_client, monkeypatch

tests/aws/services/apigateway/test_apigateway_basic.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,7 @@ def test_api_gateway_lambda_integration_aws_type(
301301
@pytest.mark.parametrize("disable_custom_cors", [True, False])
302302
@pytest.mark.parametrize("origin", ["http://allowed", "http://denied"])
303303
@markers.aws.only_localstack
304+
@markers.requires_in_process
304305
def test_invoke_endpoint_cors_headers(
305306
self, url_type, disable_custom_cors, origin, monkeypatch, aws_client
306307
):

tests/aws/services/apigateway/test_apigateway_custom_ids.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
# Custom ids can't be set on aws.
1818
@markers.aws.only_localstack
19+
@markers.requires_in_process
1920
def test_apigateway_custom_ids(
2021
aws_client, set_resource_custom_id, create_rest_apigw, account_id, region_name, cleanups
2122
):

tests/aws/services/cloudformation/api/test_stacks.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -474,6 +474,7 @@ def _assert_stack_process_finished():
474474
]
475475
assert len(updated_resources) == length_expected
476476

477+
@markers.requires_in_process
477478
@markers.aws.only_localstack
478479
def test_create_stack_with_custom_id(
479480
self, aws_client, cleanups, account_id, region_name, set_resource_custom_id

tests/aws/services/cloudformation/resources/test_lambda.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -549,6 +549,7 @@ def test_lambda_cfn_run_with_empty_string_replacement_deny_list(
549549
)
550550

551551

552+
@markers.requires_in_process
552553
@markers.aws.only_localstack(reason="This is functionality specific to Localstack")
553554
def test_lambda_cfn_run_with_non_empty_string_replacement_deny_list(
554555
deploy_cfn_template, aws_client, get_function_envars, monkeypatch

tests/aws/services/ec2/test_ec2.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -668,6 +668,7 @@ def test_create_subnet_with_custom_id_and_vpc_id(self, cleanups, aws_client, cre
668668
assert subnet["Tags"][0]["Key"] == TAG_KEY_CUSTOM_ID
669669
assert subnet["Tags"][0]["Value"] == custom_subnet_id
670670

671+
@markers.requires_in_process
671672
@markers.aws.only_localstack
672673
@pytest.mark.parametrize("strategy", ["tag", "id_manager"])
673674
@pytest.mark.parametrize("default_vpc", [True, False])
@@ -1006,6 +1007,7 @@ def test_pickle_ec2_backend(pickle_backends, aws_client):
10061007
assert pickle_backends(ec2_backends)
10071008

10081009

1010+
@markers.requires_in_process
10091011
@markers.aws.only_localstack
10101012
def test_create_specific_vpc_id(account_id, region_name, create_vpc, set_resource_custom_id):
10111013
cidr_block = "10.0.0.0/16"

tests/aws/services/events/test_events_targets.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141

4242
class TestEventsTargetApiDestination:
4343
# TODO validate against AWS & use common fixtures
44+
@markers.requires_in_process # uses pytest httpserver
4445
@markers.aws.only_localstack
4546
@pytest.mark.skipif(is_old_provider(), reason="not supported by the old provider")
4647
@pytest.mark.parametrize("auth", API_DESTINATION_AUTHS)

tests/aws/services/firehose/test_firehose.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ def handler(event, context):
3838

3939
@pytest.mark.parametrize("lambda_processor_enabled", [True, False])
4040
@markers.aws.unknown
41+
@markers.requires_in_process # uses pytest httpserver
4142
def test_kinesis_firehose_http(
4243
aws_client,
4344
lambda_processor_enabled: bool,

tests/aws/services/lambda_/test_lambda.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,7 @@ def _check_print_in_logs():
264264

265265
retry(_check_print_in_logs, retries=10)
266266

267+
@markers.requires_in_process
267268
@markers.aws.only_localstack
268269
def test_lambda_too_large_response_but_with_custom_limit(
269270
self, caplog, create_lambda_function, aws_client, monkeypatch
@@ -1970,6 +1971,7 @@ def test_lambda_runtime_wrapper_not_found(self, aws_client, create_lambda_functi
19701971
)
19711972
snapshot.match("invocation_error", result)
19721973

1974+
@markers.requires_in_process
19731975
@markers.aws.only_localstack(
19741976
reason="Can only induce Lambda-internal Docker error in LocalStack"
19751977
)
@@ -1999,6 +2001,7 @@ def test_lambda_runtime_startup_timeout(
19992001
r"retries: \d\): \[[^]]*\] Timeout while starting up lambda environment .*"
20002002
)
20012003

2004+
@markers.requires_in_process
20022005
@markers.aws.only_localstack(
20032006
reason="Can only induce Lambda-internal Docker error in LocalStack"
20042007
)

tests/aws/services/lambda_/test_lambda_api.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4799,6 +4799,7 @@ def test_create_url_config_custom_id_tag(self, create_lambda_function, aws_clien
47994799
# region changes, https vs http, etc
48004800
assert f"://{custom_id_value}.lambda-url." in url_config_created["FunctionUrl"]
48014801

4802+
@markers.requires_in_process
48024803
@markers.aws.only_localstack
48034804
def test_create_url_config_custom_id_tag_invalid_id(
48044805
self, create_lambda_function, aws_client, caplog
@@ -6855,6 +6856,7 @@ def test_layer_policy_lifecycle(
68556856
"get_layer_version_policy_postdeletes2", get_layer_version_policy_postdeletes2
68566857
)
68576858

6859+
@markers.requires_in_process
68586860
@markers.aws.only_localstack(reason="Deterministic id generation is LS only")
68596861
def test_layer_deterministic_version(
68606862
self, dummylayer, cleanups, aws_client, account_id, region_name, set_resource_custom_id

0 commit comments

Comments
 (0)