8000 revert bad change · localstack/localstack@db7a330 · GitHub
[go: up one dir, main page]

Skip to content

Commit db7a330

Browse files
committed
revert bad change
1 parent e29799d commit db7a330

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

localstack-core/localstack/services/apigateway/legacy/provider.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1963,6 +1963,15 @@ def put_integration(
19631963
"Lambda function and Firehose stream invocations."
19641964
)
19651965

1966+
moto_rest_api = get_moto_rest_api(context=context, rest_api_id=request.get("restApiId"))
1967+
resource = moto_rest_api.resources.get(request.get("resourceId"))
1968+
if not resource:
1969+
raise NotFoundException("Invalid Resource identifier specified")
1970+
1971+
method = resource.resource_methods.get(request.get("httpMethod"))
1972+
if not method:
1973+
raise NotFoundException("Invalid Method identifier specified")
1974+
19661975
# TODO: if the IntegrationType is AWS, `credentials` is mandatory
19671976
moto_request = copy.copy(request)
19681977
moto_request.setdefault("passthroughBehavior", "WHEN_NO_MATCH")

tests/aws/services/apigateway/test_apigateway_api.snapshot.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3509,7 +3509,7 @@
35093509
}
35103510
},
35113511
"tests/aws/services/apigateway/test_apigateway_api.py::TestApigatewayIntegration::test_put_integration_response_validation": {
3512-
"recorded-date": "21-08-2024, 15:09:28",
3512+
"recorded-date": "03-03-2025, 14:27:24",
35133513
"recorded-content": {
35143514
"put-integration-wrong-method": {
35153515
"Error": {

tests/aws/services/apigateway/test_apigateway_api.validation.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@
132132
"last_validated_date": "2024-12-12T10:46:41+00:00"
133133
},
134134
"tests/aws/services/apigateway/test_apigateway_api.py::TestApigatewayIntegration::test_put_integration_response_validation": {
135-
"last_validated_date": "2024-08-21T15:09:28+00:00"
135+
"last_validated_date": "2025-03-03T14:27:24+00:00"
136136
},
137137
"tests/aws/services/apigateway/test_apigateway_api.py::TestApigatewayIntegration::test_put_integration_wrong_type": {
138138
"last_validated_date": "2024-04-15T20:48:47+00:00"

0 commit comments

Comments
 (0)
0