Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: DBTP-1630 - copilot environment domain tests #716

Draft
wants to merge 7 commits into
base: DBTP-1630-terraform-environment-tests
Choose a base branch
from

Conversation

ksugden
Copy link
Contributor

@ksugden ksugden commented Jan 13, 2025

Addresses DBTP-


Checklist:

Title:

  • Scope included as per conventional commits
  • Ticket reference included (unless it's a quick out of ticket thing)

Description:

  • Link to ticket included (unless it's a quick out of ticket thing)
  • Includes tests (or an explanation for why it doesn't)
  • If the work includes user interface changes, before and after screenshots included in description
  • Includes any applicable changes to the documentation in this code base
  • Includes link(s) to any applicable changes to the documentation in the DBT Platform Documentation (can be to a pull request)

Tasks:

  • Run the end to end tests for this branch and confirm that they are passing

@ksugden ksugden changed the base branch from main to DBTP-1630-rehome-legacy-tests January 13, 2025 09:22
@ksugden ksugden changed the base branch from DBTP-1630-rehome-legacy-tests to DBTP-1630-terraform-environment-tests January 13, 2025 09:24
@@ -41,6 +41,8 @@ def test_raises_a_platform_exception_if_environment_does_not_exist_in_config(sel
):
terraform_environment.generate("not-an-environment")

# TODO test can be made more complete by using a file fixture for the expected content on the manifest
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Didn't we agree that asserting on the mock of write was sufficient for this?

@ksugden ksugden changed the title Dbtp 1630 copilot environment tests refactor: DBTP-1630 - copilot environment domain tests Jan 13, 2025
@codecov-commenter
Copy link

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
634 1 633 3
View the top 1 failed tests by shortest run time
tests/platform_helper/domain/test_copilot_environment.py::TestCopilotTemplating::test_copilot_templating_generate_generates_expected_manifest
Stack Traces | 0.021s run time
.../platform_helper/domain/test_copilot_environment.py:632: in test_copilot_templating_generate_generates_expected_manifest
    assert result == "foo"
E   assert '# WARNING: T...ights: true\n' == 'foo'
E     - foo
E     + # WARNING: This is an autogenerated file, not for manual editing.
E     + # Generated by platform-helper 12.5.0 / 2025-01-13 16:44:07
E     + # The manifest for the "connors-environment" environment.
E     + # Read the full specification for the "Environment" type at:
E     + #  https://aws.github..../docs/manifest/environment/
E     + 
E     + # Your environment name will be used in naming your resources like VPC, cluster, etc.
E     + name: connors-environment
E     + type: Environment
E     + 
E     + network:
E     +   vpc:
E     +     id: vpc-abc123
E     +     subnets:
E     +       public:
E     +         - id: def456
E     +       private:
E     +         - id: ghi789
E     + 
E     + # Configure the load balancers in your environment, once created.
E     + http:
E     +   public:
E     +     certificates:
E     +       - <MagicMock name='get_cert_arn()' id='140674283683040'>
E     + #   private:
E     + 
E     + # Configure observability for your environment resources.
E     + observability:
E     +   container_insights: true

To view more test analytics, go to the Test Analytics Dashboard
📢 Thoughts on this report? Let us know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants