Skip to content

Revert last change and Re-add location exclusion in connector tests #2832

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 1 addition & 8 deletions integration/combination/test_connectors.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
from unittest.case import skipIf

from time import sleep
from unittest import SkipTest
from parameterized import parameterized
from tenacity import retry, stop_after_attempt, retry_if_exception
from integration.conftest import clean_bucket
from integration.helpers.base_test import S3_BUCKET_PREFIX, BaseTest
from integration.helpers.resource import generate_suffix, current_region_does_not_support
from integration.config.service_names import LOCATION
from integration.helpers.resource import generate_suffix

retry_once = retry(
stop=stop_after_attempt(2),
Expand All @@ -16,10 +13,6 @@
)


@skipIf(
current_region_does_not_support([LOCATION]),
"Location service is not supported in this testing region",
)
class TestConnectors(BaseTest):
def tearDown(self):
# Some tests will create items in S3 Bucket, which result in stack DELETE_FAILED state
Expand Down
2 changes: 2 additions & 0 deletions integration/helpers/resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
REST_API,
S3_EVENTS,
SQS,
LOCATION,
SCHEDULE_EVENT,
STATE_MACHINE_INLINE_DEFINITION,
)
Expand Down Expand Up @@ -222,6 +223,7 @@ def _resource_using_s3_events(resource: Dict[str, Any]) -> bool:
S3_EVENTS: lambda template_dict, cfn_resource_types: any(
_resource_using_s3_events(resource) for resource in template_dict.get("Resources", {}).values()
),
LOCATION: lambda template_dict, cfn_resource_types: "AWS::Location::PlaceIndex" in cfn_resource_types,
}


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,14 @@ Resources:
)
Environment:
Variables:
LOCATION_INDEX: !Sub ${AWS::StackName}-PlaceIndex
LOCATION_INDEX: !Sub ${AWS::StackName}-PI


MyPlace:
Type: AWS::Location::PlaceIndex
Properties:
DataSource: Here
IndexName: !Sub ${AWS::StackName}-PlaceIndex
IndexName: !Sub ${AWS::StackName}-PI

MyConnector:
Type: AWS::Serverless::Connector
Expand Down