Skip to content

Commit

Permalink
remove cross region tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Sonal Joshi committed May 3, 2024
1 parent 27b9ecf commit 2129fd9
Showing 1 changed file with 0 additions and 57 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,10 @@ import { LogGroup, LogGroupClass } from 'aws-cdk-lib/aws-logs';

const app = new App();
const stack = new Stack(app, 'log-group-class');
const cnStack = new Stack(app, 'log-group-class-cn', {
env: {
region: 'cn-north-1',
},
});
const integTest = new IntegTest(app, 'LogGroupClassIntegTest', { testCases: [stack] });

// Create and query log group with all default settings
const logGroupDefault = new LogGroup(stack, 'log-group-default');
const logGroupDefaultCn = new LogGroup(cnStack, 'log-group-default');

const describeDefault = integTest.assertions.awsApiCall('CloudWatchLogs',
'describeLogGroups',
Expand All @@ -32,25 +26,8 @@ describeDefault.expect(ExpectedResult.objectLike({
],
}));

const describeDefaultCn = integTest.assertions.awsApiCall('CloudWatchLogs',
'describeLogGroups',
{
logGroupNamePrefix: logGroupDefaultCn.logGroupName,
});

// validate
describeDefaultCn.expect(ExpectedResult.objectLike({
logGroups: [
{
logGroupName: logGroupDefault.logGroupName,
logGroupClass: LogGroupClass.STANDARD,
},
],
}));

// Create and query log group of STANDARD LogGroupClass
const logGroupStandard = new LogGroup(stack, 'log-group-standard', { logGroupClass: LogGroupClass.STANDARD });
const logGroupStandardCn = new LogGroup(cnStack, 'log-group-standard-cn', { logGroupClass: LogGroupClass.STANDARD });
const describeStandard = integTest.assertions.awsApiCall('CloudWatchLogs',
'describeLogGroups',
{
Expand All @@ -67,25 +44,8 @@ describeStandard.expect(ExpectedResult.objectLike({
],
}));

const describeStandardCn = integTest.assertions.awsApiCall('CloudWatchLogs',
'describeLogGroups',
{
logGroupNamePrefix: logGroupStandardCn.logGroupName,
});

//validate
describeStandardCn.expect(ExpectedResult.objectLike({
logGroups: [
{
logGroupName: logGroupStandardCn.logGroupName,
logGroupClass: LogGroupClass.STANDARD,
},
],
}));

// Create and query log group of INFREQUENT_ACCESS LogGroupClass
const logGroupInfrequentAccess = new LogGroup(stack, 'log-group-infrequent-access', { logGroupClass: LogGroupClass.INFREQUENT_ACCESS });
const logGroupInfrequentAccessCn = new LogGroup(cnStack, 'log-group-infrequent-access-cn', { logGroupClass: LogGroupClass.INFREQUENT_ACCESS });
const describeInfrequentAccess = integTest.assertions.awsApiCall('CloudWatchLogs',
'describeLogGroups',
{
Expand All @@ -101,21 +61,4 @@ describeInfrequentAccess.expect(ExpectedResult.objectLike({
},
],
}));

const describeInfrequentAccessCn = integTest.assertions.awsApiCall('CloudWatchLogs',
'describeLogGroups',
{
logGroupNamePrefix: logGroupInfrequentAccessCn.logGroupName,
});

//valdiate
describeInfrequentAccessCn.expect(ExpectedResult.objectLike({
logGroups: [
{
logGroupName: logGroupInfrequentAccessCn.logGroupName,
logGroupClass: LogGroupClass.INFREQUENT_ACCESS,
},
],
}));

app.synth();

0 comments on commit 2129fd9

Please sign in to comment.