-
Notifications
You must be signed in to change notification settings - Fork 4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: make the Amplify integration tests respect AWS region assignme…
…nts (#31944) We must qualify the test to use `withAws()`, so that it gets access to AWS clients (unused) and a region allocation (we use this!). Pass the region to the Amplify client. ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
- Loading branch information
Showing
3 changed files
with
39 additions
and
9 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
14 changes: 14 additions & 0 deletions
14
packages/@aws-cdk-testing/cli-integ/tests/tool-integrations/with-tool-context.ts
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import { TestContext } from '../../lib/integ-test'; | ||
import { AwsContext, withAws } from '../../lib/with-aws'; | ||
import { DisableBootstrapContext } from '../../lib/with-cdk-app'; | ||
import { PackageContext, withPackages } from '../../lib/with-packages'; | ||
import { TemporaryDirectoryContext, withTemporaryDirectory } from '../../lib/with-temporary-directory'; | ||
|
||
/** | ||
* The default prerequisites for tests running tool integrations | ||
*/ | ||
export function withToolContext<A extends TestContext>( | ||
block: (context: A & TemporaryDirectoryContext & PackageContext & AwsContext & DisableBootstrapContext | ||
) => Promise<void>) { | ||
return withAws(withTemporaryDirectory(withPackages(block))); | ||
} |