diff --git a/test/README.md b/.tools/test/README.md similarity index 67% rename from test/README.md rename to .tools/test/README.md index cf14f38c1d7..88df10de08a 100644 --- a/test/README.md +++ b/.tools/test/README.md @@ -2,7 +2,7 @@ This directory contains the source and infrastructure code for running multi-language integration tests in AWS. ## Problem and solution statement -This repository contains example code written in [11 of the AWS-supported Software Development Kit (SDK) languages](../README.md#how-this-repository-is-organized). +This repository contains example code written in [11 of the AWS-supported Software Development Kit (SDK) languages](../../README.md#how-this-repository-is-organized). This code must be tested to ensure its accuracy and functionality over time. However, while this repository contains comprehensive test coverage, each test must be manually triggered and can take many hours to complete. @@ -19,9 +19,9 @@ In addition to the source code in this repository, this solution consists of the | Stack | Function | Purpose | |------------------------------------------------------|-------------------------------------------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------| -| [Public Images](./public_ecr_repositories) | Holds versions of language-specialized Docker images. | Event-based production of ready-to-run Docker images for each [supported SDK](https://docs.aws.amazon.com/sdkref/latest/guide/version-support-matrix.html). | -| [Producer](./eventbridge_rule_with_sns_fanout) | Publishes a scheduled message to an Amazon Simple Notification Service (Amazon SNS) topic. | Centralized cron-based triggering of integration tests. | -| [Consumer](./sqs_lambda_to_batch_fargate) | Consumes a message to trigger integration tests on AWS Batch with AWS Fargate. | Federated integration testing of example code for each [supported SDK](https://docs.aws.amazon.com/sdkref/latest/guide/version-support-matrix.html). | +| [Public Images](public_ecr_repositories) | Holds versions of language-specialized Docker images. | Event-based production of ready-to-run Docker images for each [supported SDK](https://docs.aws.amazon.com/sdkref/latest/guide/version-support-matrix.html). | +| [Producer](eventbridge_rule_with_sns_fanout) | Publishes a scheduled message to an Amazon Simple Notification Service (Amazon SNS) topic. | Centralized cron-based triggering of integration tests. | +| [Consumer](sqs_lambda_to_batch_fargate) | Consumes a message to trigger integration tests on AWS Batch with AWS Fargate. | Federated integration testing of example code for each [supported SDK](https://docs.aws.amazon.com/sdkref/latest/guide/version-support-matrix.html). | The following diagram shows the behavior of this GitHub repository and the preceding stacks: @@ -36,22 +36,22 @@ Under the hood, it relies on the source code in this repository and the followin ### 1. Image production Image repositories are managed from an AWS account in which the [Public images stack]() is deployed. -Through a secure integration, a GitHub Workflow [configured in this repository](../.github/workflows/docker-push.yml) produces Docker images containing pre-built SDK code and publishes them to the [AWS SDK Code Examples Images](https://gallery.ecr.aws/b4v4v1s0) public registry. +Through a secure integration, a GitHub Workflow [configured in this repository](../../.github/workflows/docker-push.yml) produces Docker images containing pre-built SDK code and publishes them to the [AWS SDK Code Examples Images](https://gallery.ecr.aws/b4v4v1s0) public registry. -See [CDK stack](./public_ecr_repositories). +See [CDK stack](public_ecr_repositories). ### 2. Centralized eventing -Events are emitted from an AWS account in which the [Producer Stack](./eventbridge_rule_with_sns_fanout) is deployed. +Events are emitted from an AWS account in which the [Producer Stack](eventbridge_rule_with_sns_fanout) is deployed. This stack contains a cron-based Amazon EventBridge rule that writes to a singular SNS topic. Through a cross-account integration, Amazon Simple Queue Service (Amazon SQS) queues in different AWS accounts can subscribe to this topic. -See [CDK stack](./eventbridge_rule_with_sns_fanout). +See [CDK stack](eventbridge_rule_with_sns_fanout). ### 3. Distributed testing -Testing is performed in AWS accounts in which the [Consumer Stack](./sqs_lambda_to_batch_fargate) is deployed. +Testing is performed in AWS accounts in which the [Consumer Stack](sqs_lambda_to_batch_fargate) is deployed. This stack contains an AWS Lambda function that submits jobs to AWS Batch. Through a secure integration, this Lambda function is triggered by an SQS queue that's subscribed to a cross-account topic. -See [CDK stack](./sqs_lambda_to_batch_fargate). +See [CDK stack](sqs_lambda_to_batch_fargate). diff --git a/test/architecture_diagrams/pdf/weathertop-comp-1.pdf b/.tools/test/architecture_diagrams/pdf/weathertop-comp-1.pdf similarity index 100% rename from test/architecture_diagrams/pdf/weathertop-comp-1.pdf rename to .tools/test/architecture_diagrams/pdf/weathertop-comp-1.pdf diff --git a/test/architecture_diagrams/pdf/weathertop-comp-2.pdf b/.tools/test/architecture_diagrams/pdf/weathertop-comp-2.pdf similarity index 100% rename from test/architecture_diagrams/pdf/weathertop-comp-2.pdf rename to .tools/test/architecture_diagrams/pdf/weathertop-comp-2.pdf diff --git a/test/architecture_diagrams/pdf/weathertop-high-level-architecture.pdf b/.tools/test/architecture_diagrams/pdf/weathertop-high-level-architecture.pdf similarity index 100% rename from test/architecture_diagrams/pdf/weathertop-high-level-architecture.pdf rename to .tools/test/architecture_diagrams/pdf/weathertop-high-level-architecture.pdf diff --git a/test/architecture_diagrams/png/weathertop-comp-1.png b/.tools/test/architecture_diagrams/png/weathertop-comp-1.png similarity index 100% rename from test/architecture_diagrams/png/weathertop-comp-1.png rename to .tools/test/architecture_diagrams/png/weathertop-comp-1.png diff --git a/test/architecture_diagrams/png/weathertop-comp-2.png b/.tools/test/architecture_diagrams/png/weathertop-comp-2.png similarity index 100% rename from test/architecture_diagrams/png/weathertop-comp-2.png rename to .tools/test/architecture_diagrams/png/weathertop-comp-2.png diff --git a/test/architecture_diagrams/png/weathertop-high-level-architecture.png b/.tools/test/architecture_diagrams/png/weathertop-high-level-architecture.png similarity index 100% rename from test/architecture_diagrams/png/weathertop-high-level-architecture.png rename to .tools/test/architecture_diagrams/png/weathertop-high-level-architecture.png diff --git a/test/config/README.md b/.tools/test/config/README.md similarity index 100% rename from test/config/README.md rename to .tools/test/config/README.md diff --git a/test/config/resources.yaml b/.tools/test/config/resources.yaml similarity index 100% rename from test/config/resources.yaml rename to .tools/test/config/resources.yaml diff --git a/test/config/targets.yaml b/.tools/test/config/targets.yaml similarity index 100% rename from test/config/targets.yaml rename to .tools/test/config/targets.yaml diff --git a/test/eventbridge_rule_with_sns_fanout/.gitignore b/.tools/test/eventbridge_rule_with_sns_fanout/.gitignore similarity index 100% rename from test/eventbridge_rule_with_sns_fanout/.gitignore rename to .tools/test/eventbridge_rule_with_sns_fanout/.gitignore diff --git a/test/eventbridge_rule_with_sns_fanout/README.md b/.tools/test/eventbridge_rule_with_sns_fanout/README.md similarity index 100% rename from test/eventbridge_rule_with_sns_fanout/README.md rename to .tools/test/eventbridge_rule_with_sns_fanout/README.md diff --git a/test/eventbridge_rule_with_sns_fanout/app.py b/.tools/test/eventbridge_rule_with_sns_fanout/app.py similarity index 100% rename from test/eventbridge_rule_with_sns_fanout/app.py rename to .tools/test/eventbridge_rule_with_sns_fanout/app.py diff --git a/test/eventbridge_rule_with_sns_fanout/cdk.json b/.tools/test/eventbridge_rule_with_sns_fanout/cdk.json similarity index 100% rename from test/eventbridge_rule_with_sns_fanout/cdk.json rename to .tools/test/eventbridge_rule_with_sns_fanout/cdk.json diff --git a/test/eventbridge_rule_with_sns_fanout/producer_stack/producer_stack.py b/.tools/test/eventbridge_rule_with_sns_fanout/producer_stack/producer_stack.py similarity index 100% rename from test/eventbridge_rule_with_sns_fanout/producer_stack/producer_stack.py rename to .tools/test/eventbridge_rule_with_sns_fanout/producer_stack/producer_stack.py diff --git a/test/eventbridge_rule_with_sns_fanout/requirements.txt b/.tools/test/eventbridge_rule_with_sns_fanout/requirements.txt similarity index 100% rename from test/eventbridge_rule_with_sns_fanout/requirements.txt rename to .tools/test/eventbridge_rule_with_sns_fanout/requirements.txt diff --git a/test/eventbridge_rule_with_sns_fanout/source.bat b/.tools/test/eventbridge_rule_with_sns_fanout/source.bat similarity index 100% rename from test/eventbridge_rule_with_sns_fanout/source.bat rename to .tools/test/eventbridge_rule_with_sns_fanout/source.bat diff --git a/test/public_ecr_repositories/.gitignore b/.tools/test/public_ecr_repositories/.gitignore similarity index 100% rename from test/public_ecr_repositories/.gitignore rename to .tools/test/public_ecr_repositories/.gitignore diff --git a/test/public_ecr_repositories/README.md b/.tools/test/public_ecr_repositories/README.md similarity index 100% rename from test/public_ecr_repositories/README.md rename to .tools/test/public_ecr_repositories/README.md diff --git a/test/public_ecr_repositories/__init__.py b/.tools/test/public_ecr_repositories/__init__.py similarity index 100% rename from test/public_ecr_repositories/__init__.py rename to .tools/test/public_ecr_repositories/__init__.py diff --git a/test/public_ecr_repositories/app.py b/.tools/test/public_ecr_repositories/app.py similarity index 88% rename from test/public_ecr_repositories/app.py rename to .tools/test/public_ecr_repositories/app.py index 2e7da12e743..0688359c02e 100644 --- a/test/public_ecr_repositories/app.py +++ b/.tools/test/public_ecr_repositories/app.py @@ -2,8 +2,9 @@ import os import aws_cdk as cdk -from public_ecr_repositories_stack.public_ecr_repositories_stack import \ - PublicEcrRepositoriesStack +from public_ecr_repositories_stack.public_ecr_repositories_stack import ( + PublicEcrRepositoriesStack, +) app = cdk.App() PublicEcrRepositoriesStack( diff --git a/test/public_ecr_repositories/cdk.json b/.tools/test/public_ecr_repositories/cdk.json similarity index 100% rename from test/public_ecr_repositories/cdk.json rename to .tools/test/public_ecr_repositories/cdk.json diff --git a/test/public_ecr_repositories/public_ecr_repositories_stack/__init__.py b/.tools/test/public_ecr_repositories/public_ecr_repositories_stack/__init__.py similarity index 100% rename from test/public_ecr_repositories/public_ecr_repositories_stack/__init__.py rename to .tools/test/public_ecr_repositories/public_ecr_repositories_stack/__init__.py diff --git a/test/public_ecr_repositories/public_ecr_repositories_stack/public_ecr_repositories_stack.py b/.tools/test/public_ecr_repositories/public_ecr_repositories_stack/public_ecr_repositories_stack.py similarity index 99% rename from test/public_ecr_repositories/public_ecr_repositories_stack/public_ecr_repositories_stack.py rename to .tools/test/public_ecr_repositories/public_ecr_repositories_stack/public_ecr_repositories_stack.py index 2de01114a39..016a51b9602 100644 --- a/test/public_ecr_repositories/public_ecr_repositories_stack/public_ecr_repositories_stack.py +++ b/.tools/test/public_ecr_repositories/public_ecr_repositories_stack/public_ecr_repositories_stack.py @@ -1,7 +1,8 @@ +import yaml from aws_cdk import Stack from aws_cdk import aws_ecr as ecr from constructs import Construct -import yaml + class PublicEcrRepositoriesStack(Stack): def __init__(self, scope: Construct, construct_id: str, **kwargs) -> None: diff --git a/test/public_ecr_repositories/requirements.txt b/.tools/test/public_ecr_repositories/requirements.txt similarity index 100% rename from test/public_ecr_repositories/requirements.txt rename to .tools/test/public_ecr_repositories/requirements.txt diff --git a/test/public_ecr_repositories/scripts/upload_image.sh b/.tools/test/public_ecr_repositories/scripts/upload_image.sh similarity index 100% rename from test/public_ecr_repositories/scripts/upload_image.sh rename to .tools/test/public_ecr_repositories/scripts/upload_image.sh diff --git a/test/public_ecr_repositories/source.bat b/.tools/test/public_ecr_repositories/source.bat similarity index 100% rename from test/public_ecr_repositories/source.bat rename to .tools/test/public_ecr_repositories/source.bat diff --git a/test/sqs_lambda_to_batch_fargate/.gitignore b/.tools/test/sqs_lambda_to_batch_fargate/.gitignore similarity index 100% rename from test/sqs_lambda_to_batch_fargate/.gitignore rename to .tools/test/sqs_lambda_to_batch_fargate/.gitignore diff --git a/test/sqs_lambda_to_batch_fargate/README.md b/.tools/test/sqs_lambda_to_batch_fargate/README.md similarity index 100% rename from test/sqs_lambda_to_batch_fargate/README.md rename to .tools/test/sqs_lambda_to_batch_fargate/README.md diff --git a/test/sqs_lambda_to_batch_fargate/app.py b/.tools/test/sqs_lambda_to_batch_fargate/app.py similarity index 100% rename from test/sqs_lambda_to_batch_fargate/app.py rename to .tools/test/sqs_lambda_to_batch_fargate/app.py diff --git a/test/sqs_lambda_to_batch_fargate/cdk.json b/.tools/test/sqs_lambda_to_batch_fargate/cdk.json similarity index 100% rename from test/sqs_lambda_to_batch_fargate/cdk.json rename to .tools/test/sqs_lambda_to_batch_fargate/cdk.json diff --git a/test/sqs_lambda_to_batch_fargate/consumer_stack/consumer_stack.py b/.tools/test/sqs_lambda_to_batch_fargate/consumer_stack/consumer_stack.py similarity index 100% rename from test/sqs_lambda_to_batch_fargate/consumer_stack/consumer_stack.py rename to .tools/test/sqs_lambda_to_batch_fargate/consumer_stack/consumer_stack.py diff --git a/test/sqs_lambda_to_batch_fargate/lambda/export_logs.py b/.tools/test/sqs_lambda_to_batch_fargate/lambda/export_logs.py similarity index 100% rename from test/sqs_lambda_to_batch_fargate/lambda/export_logs.py rename to .tools/test/sqs_lambda_to_batch_fargate/lambda/export_logs.py diff --git a/test/sqs_lambda_to_batch_fargate/lambda/submit_job.py b/.tools/test/sqs_lambda_to_batch_fargate/lambda/submit_job.py similarity index 100% rename from test/sqs_lambda_to_batch_fargate/lambda/submit_job.py rename to .tools/test/sqs_lambda_to_batch_fargate/lambda/submit_job.py diff --git a/test/sqs_lambda_to_batch_fargate/requirements.txt b/.tools/test/sqs_lambda_to_batch_fargate/requirements.txt similarity index 100% rename from test/sqs_lambda_to_batch_fargate/requirements.txt rename to .tools/test/sqs_lambda_to_batch_fargate/requirements.txt diff --git a/test/sqs_lambda_to_batch_fargate/source.bat b/.tools/test/sqs_lambda_to_batch_fargate/source.bat similarity index 100% rename from test/sqs_lambda_to_batch_fargate/source.bat rename to .tools/test/sqs_lambda_to_batch_fargate/source.bat