Skip to content

chore: add e2e suite for extended svc configurations#1302

Merged
mergify[bot] merged 11 commits intoaws:mainlinefrom
bvtujo:storage/e2e
Aug 21, 2020
Merged

chore: add e2e suite for extended svc configurations#1302
mergify[bot] merged 11 commits intoaws:mainlinefrom
bvtujo:storage/e2e

Conversation

@bvtujo
Copy link
Copy Markdown
Contributor

@bvtujo bvtujo commented Aug 19, 2020

Adds a new test suite exercising the docker build arg overrides. Deploys a service with a default env variable of "open caraway" and only succeeds if the manifest correctly overrides "open caraway" to "open sesame"

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@bvtujo bvtujo requested a review from a team as a code owner August 19, 2020 19:56
@bvtujo bvtujo requested a review from kohidave August 19, 2020 19:56
@efekarakus
Copy link
Copy Markdown
Contributor

What do you think about modifying one of our existing tests like the back-end service in multi-svc-app instead of creating a new e2e test?
Now that builds are in parallel it's not so problematic tbh, but I'm trying to think what warrants a new test vs adding more functionality to an existing one since they're so heavy to create and can be flaky when account limits are hit.

I'm leaning towards creating a separate e2e test if it represents a different journey for the customer (like using a custom env instead of default env). Otherwise, let's try to shove the functionality to an existing test.

Due to their high maintenance cost you should aim to reduce the number of end-to-end tests to a bare minimum.

Think about the high-value interactions users will have with your application. Try to come up with user journeys that define the core value of your product and translate the most important steps of these user journeys into automated end-to-end tests.

https://martinfowler.com/articles/practical-test-pyramid.html#End-to-endTests

@bvtujo
Copy link
Copy Markdown
Contributor Author

bvtujo commented Aug 19, 2020

@efekarakus I think that's a good idea and will rework this test this afternoon.

Copy link
Copy Markdown
Contributor

@efekarakus efekarakus left a comment

Choose a reason for hiding this comment

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

Looks really good to me! Let me know what you think of the comment below and then :shipit:

Comment thread e2e/multi-svc-app/multi_svc_app_test.go Outdated
Expect(err).NotTo(HaveOccurred(), "create destination manifest")
defer destFile.Close()

srcFile, err := os.Open("./front-end/manifest.yml")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think if we move the manifest from "./front-end/manifest.yml" to "./copilot/front-end/manifest.yml" we can get rid of the code since "svc init" doesn't override the manifest anymore if one exists

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Agreed. Done in 0cfd505.

// in a response of "open sesame"
bodyBytes, err := ioutil.ReadAll(resp.Body)
Expect(err).NotTo(HaveOccurred())
Expect(string(bodyBytes)).To(Equal("open sesame"))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this is v cool :D

Copy link
Copy Markdown
Contributor

@iamhopaul123 iamhopaul123 left a comment

Choose a reason for hiding this comment

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

:shipit:

@mergify mergify bot merged commit 35190e4 into aws:mainline Aug 21, 2020
@bvtujo
Copy link
Copy Markdown
Contributor Author

bvtujo commented Aug 21, 2020

These pass locally.


Ran 14 of 15 Specs in 1354.351 seconds
SUCCESS! -- 14 Passed | 0 Failed | 0 Pending | 1 Skipped
PASS

Ginkgo ran 1 suite in 22m37.706371402s
Test Suite Passed

thrau pushed a commit to localstack/copilot-cli-local that referenced this pull request Dec 9, 2022
Adds a new test suite exercising the docker build arg overrides. Deploys a service with a default env variable of "open caraway" and only succeeds if the manifest correctly overrides "open caraway" to "open sesame"

<!-- 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.
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.

4 participants