diff --git a/terraform/infrastructure/modules/api_gateway/api_gateway.tf b/terraform/infrastructure/modules/api_gateway/api_gateway.tf index 57ca9e75c..f40307b01 100644 --- a/terraform/infrastructure/modules/api_gateway/api_gateway.tf +++ b/terraform/infrastructure/modules/api_gateway/api_gateway.tf @@ -16,6 +16,8 @@ resource "aws_api_gateway_method" "capability" { resource_id = aws_api_gateway_resource.capability.id http_method = "GET" authorization = "NONE" + + depends_on = [aws_api_gateway_resource.capability] } resource "aws_api_gateway_integration" "capability" { @@ -63,6 +65,11 @@ resource "aws_api_gateway_deployment" "api_gateway_deployment" { depends_on = [ aws_api_gateway_rest_api.api_gateway_rest_api, + aws_api_gateway_resource.capability, + aws_api_gateway_method.capability, + aws_api_gateway_integration.capability, + aws_api_gateway_method_response.capability_200, + aws_api_gateway_integration_response.capability, aws_api_gateway_integration_response.head_integration_response ] } diff --git a/tests/smoke/scenarios/api_capability_statement_lookup.py b/tests/smoke/scenarios/api_capability_statement_lookup.py index f21f15106..71959df30 100644 --- a/tests/smoke/scenarios/api_capability_statement_lookup.py +++ b/tests/smoke/scenarios/api_capability_statement_lookup.py @@ -1,9 +1,6 @@ -import pytest - from tests.utilities.api_clients import ConsumerTestClient, ProducerTestClient -@pytest.mark.skip(reason="Capability statements aren't working reliably at the minute") def test_read_api_capability_statements( consumer_client: ConsumerTestClient, producer_client: ProducerTestClient ):