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

Replace AWS.Kinesis/Stream with AWS.S3/Bucket in functional tests #5227

Merged
merged 5 commits into from
Mar 7, 2023

Conversation

willdavsmith
Copy link
Contributor

Description

  • Replaces AWS.Kinesis/Stream resources in functional tests with AWS.S3/Bucket for cost savings

Issue Reference

https://dev.azure.com/azure-octo/Incubations/_workitems/edit/6401

@willdavsmith willdavsmith self-assigned this Mar 2, 2023
@willdavsmith willdavsmith reopened this Mar 3, 2023
@willdavsmith willdavsmith marked this pull request as ready for review March 7, 2023 18:18
@willdavsmith willdavsmith requested a review from a team as a code owner March 7, 2023 18:18
@willdavsmith willdavsmith changed the title [WIP] Removing AWS.Kinesis/Stream from functional tests Removing AWS.Kinesis/Stream from functional tests Mar 7, 2023
@github-actions
Copy link

github-actions bot commented Mar 7, 2023

Unit-test coverage result

The unit-test coverage rate is 60.3%. If you want to see the detailed report, please go to Checks tab, click Build and Test, and then download unit_test_coverage artifact at the bottom of build page.

This result does not include the functional test coverage.

@@ -17,42 +17,50 @@ import (

func Test_AWSRedeployWithUpdatedResourceUpdatesResource(t *testing.T) {
templateFmt := "testdata/aws-mechanics-redeploy-withupdatedresource.step%d.bicep"
name := "ms" + uuid.New().String()
name := "radiusfunctionaltestbucket-" + uuid.New().String()
Copy link
Contributor

Choose a reason for hiding this comment

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

Could this run into length constraints?

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 will be 63 characters (e.g. radiusfunctionaltestbucket-4c4f3c7e-8341-41f3-a275-e4b39bbcc449), which conforms to our spec as well as AWS', so we should be good
image

test.Test(t)
}

func Test_AWS_S3Bucket_Existing(t *testing.T) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we add doc here to identify the difference between this test and the one above?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

added

Copy link
Contributor

Choose a reason for hiding this comment

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

Could you point me to the doc?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

basically the idea is that the first step deploys the S3Bucket resource, then the second step uses the bicep existing keyword during the deployment, which should retrieve the same resource. If you check the bicep definition here, you can see that the key and the value are not specified. We add them in the test to make sure we get the same resource. Sorry for the confusion :)

Tags: [
{
Key: 'testKey'
Value: 'testValue2'
Copy link
Contributor

Choose a reason for hiding this comment

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

Where is this value tested?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@github-actions
Copy link

github-actions bot commented Mar 7, 2023

Unit-test coverage result

The unit-test coverage rate is 60.3%. If you want to see the detailed report, please go to Checks tab, click Build and Test, and then download unit_test_coverage artifact at the bottom of build page.

This result does not include the functional test coverage.

Copy link
Contributor

@ytimocin ytimocin left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link

@youngbupark youngbupark left a comment

Choose a reason for hiding this comment

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

@willdavsmith I would change the title of this PR. e.g. Replace AWS.Kinesis/Stream with S3 in functional tests or Use S3 xxx

@willdavsmith willdavsmith changed the title Removing AWS.Kinesis/Stream from functional tests Replace AWS.Kinesis/Stream with AWS.S3/Bucket in functional tests Mar 7, 2023
@willdavsmith willdavsmith merged commit 60f44f3 into main Mar 7, 2023
@willdavsmith willdavsmith deleted the willdavsmith/replace-kinesis branch March 7, 2023 21:44
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