Skip to content

Commit

Permalink
test: rm integ tests from the test task
Browse files Browse the repository at this point in the history
  • Loading branch information
moltar committed Sep 16, 2022
1 parent 575d210 commit 6e43c61
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .projen/tasks.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions .projenrc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ const project = new awscdk.AwsCdkConstructLibrary({
'cdk.context.json',
],
integrationTestAutoDiscover: true,

});

const DOT_ENV_EXAMPLE: Record<string, string> = {
Expand Down Expand Up @@ -58,4 +59,19 @@ cdkConfig.json.addDeletionOverride('app');
cdkConfig.json.addDeletionOverride('context');
cdkConfig.json.addDeletionOverride('output');

/**
* A hack to remove the integratio test from the overall test process.
*
* These tests are executed in CI, and require acccess to AWS.
*
* > Need to perform AWS calls for account 000000000, but no credentials have been configured
*
* Can't figure out another way to disable the integ tests from being injected into the test task.
*/
project.testTask.steps.forEach((step) => {
if (step.spawn?.startsWith('integ:')) {
Object.assign(step, { spawn: 'true' });
}
});

project.synth();

0 comments on commit 6e43c61

Please sign in to comment.