-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add initial setup for pytest and GitHubClient tests - Created pytest configuration file `pytest.ini` for test discovery and options. - Added `requirements.txt` for project dependencies including testing libraries. - Introduced `test_payload.json` for storing test data related to EKS settings. - Established a test package with `__init__.py` in the `tests` directory. - Implemented fixtures in `conftest.py` for mocking GitHub API responses. - Developed unit tests for `GitHubClient` methods in `test_github_client.py`. - Created integration tests for `GitHubClient` in `test_github_client_integration.py`. - Added environment cleanup fixture to ensure a clean state for tests. - Implemented unit tests for application logic in `test_app.py`, including SSM parameter retrieval and GitHub operations. * Refactor GitHub token handling to use GITHUB_TOKEN_SECRET_NAME * Add team-based admin access feature to GitHubClient and integration tests --------- Co-authored-by: Dave Arnold <dave@roknsound.com>
- Loading branch information
2 people
authored and
GitHub
committed
Apr 25, 2025
1 parent
3a0f957
commit 813e00f
Showing
26 changed files
with
556 additions
and
241 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,49 +1,52 @@ | ||
| provider "aws" { | ||
| region = "us-east-1" | ||
| region = var.aws_region | ||
| } | ||
|
|
||
| data "aws_caller_identity" "current" {} | ||
|
|
||
| resource "aws_ecrpublic_repository" "eks-automation-lambda" { | ||
| repository_name = "eks-automation-lambda" | ||
| resource "aws_ecrpublic_repository" "ecr_repo" { | ||
| repository_name = var.repository_name | ||
|
|
||
| catalog_data { | ||
| about_text = "EKS Automation Lambda Image" | ||
| architectures = ["x86_64"] | ||
| description = "Lambda container image for EKS automation" | ||
| operating_systems = ["AmazonLinux2"] | ||
| usage_text = "Creates an EKS Automation Lambda container image" | ||
| about_text = var.catalog_data.about_text | ||
| architectures = var.catalog_data.architectures | ||
| description = var.catalog_data.description | ||
| operating_systems = var.catalog_data.operating_systems | ||
| usage_text = var.catalog_data.usage_text | ||
| } | ||
|
|
||
| tags = { | ||
| env = "production" | ||
| } | ||
| tags = var.tags | ||
| } | ||
|
|
||
| locals { | ||
| repository_uri = aws_ecrpublic_repository.eks-automation-lambda.repository_uri | ||
| repository_id = aws_ecrpublic_repository.eks-automation-lambda.id | ||
| repository_uri = aws_ecrpublic_repository.ecr_repo.repository_uri | ||
| repository_id = aws_ecrpublic_repository.ecr_repo.id | ||
| aws_account_id = data.aws_caller_identity.current.account_id | ||
| region = "us-east-1" | ||
| arn = aws_ecrpublic_repository.eks-automation-lambda.arn | ||
| region = var.aws_region | ||
| arn = aws_ecrpublic_repository.ecr_repo.arn | ||
| } | ||
|
|
||
| output "repository_uri" { | ||
| value = local.repository_uri | ||
| description = "The URI of the ECR repository" | ||
| value = local.repository_uri | ||
| } | ||
|
|
||
| output "repository_id" { | ||
| value = local.repository_id | ||
| description = "The ID of the ECR repository" | ||
| value = local.repository_id | ||
| } | ||
|
|
||
| output "aws_account_id" { | ||
| value = local.aws_account_id | ||
| description = "The ID of the AWS account" | ||
| value = local.aws_account_id | ||
| } | ||
|
|
||
| output "region" { | ||
| value = local.region | ||
| description = "The AWS region where resources are created" | ||
| value = local.region | ||
| } | ||
|
|
||
| output "arn" { | ||
| value = local.arn | ||
| description = "The ARN of the ECR repository" | ||
| value = local.arn | ||
| } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| from setuptools import setup, find_packages | ||
|
|
||
| setup( | ||
| name="template-automation", | ||
| version="0.1.0", | ||
| packages=find_packages(), | ||
| install_requires=[ | ||
| "boto3", | ||
| "requests" | ||
| ], | ||
| extras_require={ | ||
| "test": [ | ||
| "pytest", | ||
| "pytest-mock" | ||
| ] | ||
| } | ||
| ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| { | ||
| "folders": [ | ||
| { | ||
| "path": "." | ||
| }, | ||
| { | ||
| "path": "../terraform-aws-template-automation" | ||
| }, | ||
| { | ||
| "path": "../providers/terraform-provider-aws/website/docs/d" | ||
| }, | ||
| { | ||
| "path": "../providers/terraform-provider-aws/website/docs/r" | ||
| } | ||
| ], | ||
| "settings": {} | ||
| } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| # Package initialization |
Oops, something went wrong.