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

Add integration tests for remaining resources #209

Merged
merged 3 commits into from
Nov 11, 2024

Conversation

corymhall
Copy link
Contributor

@corymhall corymhall commented Nov 11, 2024

This adds integration tests for the remaining construct libraries.

Also adds mapping for one missing CCAPI resource
(AWS::Events::EventBusPolicy)

closes #183

This adds integration tests for the remaining construct libraries.

Also adds mapping for one missing CCAPI resource
(`AWS::Events::EventBusPolicy`)

re #183
Dir: filepath.Join(getCwd(t), "misc-services"),
})

integration.ProgramTest(t, &test)
Copy link
Member

Choose a reason for hiding this comment

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

A small assert on the outputs is appreciated!

Dir: filepath.Join(getCwd(t), "misc-services"),
ExtraRuntimeValidation: func(t *testing.T, stack integration.RuntimeValidationStackInfo) {
repoName := stack.Outputs["repoName"].(string)
assert.Containsf(t, "testrepob5dda46f", repoName, "Expected repoName to contain 'testrepob5dda46f'; got %s", repoName)
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we expect exactly this suffix? The b5dda46f is random, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the CDK generated suffix so it is a hash based on the construct tree. It will be the same everytime.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah and I guess it's fine anyways because there shouldn't be any change to the tree as those would essentially cause a replacement (because the name changes), right?
Thanks for the explanation!

@corymhall corymhall merged commit 005bb80 into main Nov 11, 2024
11 checks passed
@corymhall corymhall deleted the corymhall/integration-misc branch November 11, 2024 17:32
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.

Add tests for top 19/20 constructs
3 participants