Skip to content

Commit

Permalink
Fixing integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
EthanBunce committed Aug 22, 2024
1 parent 97e6a14 commit 6406447
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- replace deprecated `auto_delete_images` with `empty_on_delete` & bump CDK version in `ecr` module
- fixed the failing regex error in the eks module when env var SEEDFARMER_PARAMETER_REPLICATED_ECR_IMAGES_METADATA_S3_PATH is not set
- refactored docker images replication module
- fixed `network/basic-cdk` module integration test failure

### **Removed**

Expand Down
12 changes: 12 additions & 0 deletions modules/network/basic-cdk/integ/integ_network.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import datetime
import os
import sys

import aws_cdk as cdk
import aws_cdk.cloud_assembly_schema as cas
import aws_cdk.integ_tests_alpha as integration
import boto3

sys.path.append("../")

Expand All @@ -12,6 +14,10 @@
app = cdk.App()
timestamp = datetime.datetime.now()

ec2_client = boto3.client("ec2", region_name=os.getenv("AWS_REGION"))
response = ec2_client.describe_availability_zones()
availability_zones = [az["ZoneName"] for az in response["AvailabilityZones"]][:3]

integration.IntegTest(
app,
"Integration Tests Basic Module",
Expand All @@ -22,7 +28,10 @@
project_name="integ",
deployment_name="testing",
module_name="basic-cdk",
vpc_cidr="10.0.0.0/16",
cidr_mask=24,
internet_accessible=True,
local_zones=availability_zones,
stack_description=f"""
Integration Test: {timestamp.month}-{timestamp.day} {timestamp.hour}:{timestamp.minute}
""",
Expand All @@ -33,7 +42,10 @@
project_name="integ",
deployment_name="testing",
module_name="basic-cdk",
vpc_cidr="10.0.0.0/16",
cidr_mask=24,
internet_accessible=False,
local_zones=availability_zones,
stack_description=f"""
Integration Test: {timestamp.month}-{timestamp.day} {timestamp.hour}:{timestamp.minute}
""",
Expand Down
1 change: 1 addition & 0 deletions modules/network/basic-cdk/requirements.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
aws-cdk-lib==2.128.0
aws_cdk.integ-tests-alpha==2.128.0a0
cdk-nag==2.12.29
constructs==10.0.91
15 changes: 11 additions & 4 deletions modules/network/basic-cdk/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#
# This file is autogenerated by pip-compile with python 3.9
# To update, run:
# This file is autogenerated by pip-compile with Python 3.9
# by the following command:
#
# pip-compile requirements.in
#
Expand All @@ -14,9 +14,12 @@ aws-cdk-asset-kubectl-v20==2.1.2
# via aws-cdk-lib
aws-cdk-asset-node-proxy-agent-v6==2.0.3
# via aws-cdk-lib
aws-cdk-integ-tests-alpha==2.128.0a0
# via -r requirements.in
aws-cdk-lib==2.128.0
# via
# -r requirements.in
# aws-cdk-integ-tests-alpha
# cdk-nag
cattrs==23.2.3
# via jsii
Expand All @@ -25,9 +28,10 @@ cdk-nag==2.12.29
constructs==10.0.91
# via
# -r requirements.in
# aws-cdk-integ-tests-alpha
# aws-cdk-lib
# cdk-nag
exceptiongroup==1.2.1
exceptiongroup==1.2.2
# via cattrs
importlib-resources==6.4.0
# via jsii
Expand All @@ -36,6 +40,7 @@ jsii==1.100.0
# aws-cdk-asset-awscli-v1
# aws-cdk-asset-kubectl-v20
# aws-cdk-asset-node-proxy-agent-v6
# aws-cdk-integ-tests-alpha
# aws-cdk-lib
# cdk-nag
# constructs
Expand All @@ -44,6 +49,7 @@ publication==0.0.3
# aws-cdk-asset-awscli-v1
# aws-cdk-asset-kubectl-v20
# aws-cdk-asset-node-proxy-agent-v6
# aws-cdk-integ-tests-alpha
# aws-cdk-lib
# cdk-nag
# constructs
Expand All @@ -57,11 +63,12 @@ typeguard==2.13.3
# aws-cdk-asset-awscli-v1
# aws-cdk-asset-kubectl-v20
# aws-cdk-asset-node-proxy-agent-v6
# aws-cdk-integ-tests-alpha
# aws-cdk-lib
# jsii
typing-extensions==4.12.2
# via
# cattrs
# jsii
zipp==3.19.2
zipp==3.20.0
# via importlib-resources

0 comments on commit 6406447

Please sign in to comment.