test(e2e): add e2e test for customized resources#1264
test(e2e): add e2e test for customized resources#1264mergify[bot] merged 5 commits intoaws:mainlinefrom
Conversation
|
looks like we are doing a release tomorrow. i'll split up this pr and get env init changes out of this one. |
066f613 to
6298792
Compare
5057be1 to
c419f81
Compare
44cda84 to
64f51d8
Compare
| It("deploy vpc cloudformation stack", func() { | ||
| err := command.Run("aws", []string{"cloudformation", "create-stack", "--stack-name", | ||
| vpcStackName, "--template-body", vpcStackTemplatePath}) | ||
| Expect(err).NotTo(HaveOccurred(), "create vpc cloudformation stack") | ||
| err = command.Run("aws", []string{"cloudformation", "wait", "stack-create-complete", "--stack-name", vpcStackName}) | ||
| Expect(err).NotTo(HaveOccurred(), "vpc stack create complete") | ||
| }) |
There was a problem hiding this comment.
Can we throw this into a BeforeAll?
| var b bytes.Buffer | ||
| err := command.Run("bash", []string{"-c", fmt.Sprintf("aws cloudformation describe-stacks --stack-name %s | jq -r .Stacks[0].Outputs", vpcStackName)}, command.Stdout(&b)) | ||
| Expect(err).NotTo(HaveOccurred(), "describe vpc cloudformation stack") |
There was a problem hiding this comment.
Maybe we can throw this into a aws.go file? (Like how we have the CLI one). The Output can be a VPC object or whatever - that way the tests stay really focused on the expected output.
| }) | ||
| }) | ||
|
|
||
| It("svc deploy should succeed to both environment", func() { |
There was a problem hiding this comment.
| It("svc deploy should succeed to both environment", func() { | |
| It("svc deploy should succeed to both environments", func() { |
| } | ||
| }) | ||
|
|
||
| It("env show should display info for test and prod envs", func() { |
There was a problem hiding this comment.
Dumb question: Do we we care about any of the service workflows in this e2e test?
I wonder if instead we should have only this It and include --resources to the command to validate if the environment is created with the appropriate resource configurations?
There was a problem hiding this comment.
hmm i think it doesn't hurt to validate show and logs to make sure the svc we deploy is actually working as expected. But I'll add validation for --resources!
64f51d8 to
926a9b0
Compare
<!-- Provide summary of changes --> Move bash commands in e2e tests to `client` pkg so as to make e2e tests more declarative. Address #1264 (comment). <!-- Issue number, if available. E.g. "Fixes #31", "Addresses #42, 77" --> By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
This PR adds e2e test for customized env resources. <!-- Provide summary of changes --> <!-- Issue number, if available. E.g. "Fixes aws#31", "Addresses aws#42, 77" --> By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
<!-- Provide summary of changes --> Move bash commands in e2e tests to `client` pkg so as to make e2e tests more declarative. Address aws#1264 (comment). <!-- Issue number, if available. E.g. "Fixes aws#31", "Addresses aws#42, 77" --> By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
This PR adds e2e test for customized env resources.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.