Skip to content

Commit

Permalink
test: no log retention defined
Browse files Browse the repository at this point in the history
  • Loading branch information
nikovirtala committed Aug 4, 2022
1 parent fe6bf6f commit ea5303d
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions packages/@aws-cdk/aws-appsync/test/appsync.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -225,4 +225,16 @@ test('log retention should be configured with given retention time when specifie
},
RetentionInDays: 7,
});
});

test('log retention should not appear when no retention time is specified', () => {
// WHEN
new appsync.GraphqlApi(stack, 'no-log-retention', {
authorizationConfig: {},
name: 'no-log-retention',
schema: appsync.Schema.fromAsset(path.join(__dirname, 'appsync.test.graphql')),
});

// THEN
Template.fromStack(stack).resourceCountIs('Custom::LogRetention', 0);
});

0 comments on commit ea5303d

Please sign in to comment.