-
Notifications
You must be signed in to change notification settings - Fork 405
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: stub AreCredsFromEnvVars in app init to speed tests by 70s (#2465)
🤦 Previously, we were calling sessions.AreCredsFromEnvVars in our tests which would timeout after 10s: https://github.com/aws/copilot-cli/blob/f2f0ee317e01b9da85ab72ecd64481c10658cd05/internal/pkg/aws/sessions/sessions.go#L28 Since the test TestInitAppOpts_Ask has 7 testcases it would take 70s to test the cli package. With this one weird trick™️ and replacing the functional call with a fake, we speed up our tests by 70s. By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.
- Loading branch information
1 parent
8236f9b
commit a486bac
Showing
3 changed files
with
18 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters