Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(integ-tests): cannot make two or more identical assertions #27380

Merged
merged 10 commits into from
Oct 10, 2023
Prev Previous commit
Next Next commit
deplossert -> deployAssert
  • Loading branch information
misterjoshua committed Oct 3, 2023
commit d8b0441b6b5b0de42c4ac419f4fbe45d0367cf3a
Original file line number Diff line number Diff line change
Expand Up @@ -165,12 +165,12 @@ describe('DeployAssert', () => {
const app = new App();

// WHEN
const deplossert = new DeployAssert(app);
deplossert.awsApiCall('MyService', 'MyApi');
deplossert.awsApiCall('MyService', 'MyApi');
const deployAssert = new DeployAssert(app);
deployAssert.awsApiCall('MyService', 'MyApi');
deployAssert.awsApiCall('MyService', 'MyApi');

// THEN
const template = Template.fromStack(deplossert.scope);
const template = Template.fromStack(deployAssert.scope);
template.resourceCountIs('AWS::Lambda::Function', 1);
template.resourceCountIs('Custom::DeployAssert@SdkCallMyServiceMyApi', 2);
});
Expand Down Expand Up @@ -238,12 +238,12 @@ describe('DeployAssert', () => {
const app = new App();

// WHEN
const deplossert = new DeployAssert(app);
deplossert.httpApiCall('https://example.com/test');
deplossert.httpApiCall('https://example.com/test');
const deployAssert = new DeployAssert(app);
deployAssert.httpApiCall('https://example.com/test');
deployAssert.httpApiCall('https://example.com/test');

// THEN
const template = Template.fromStack(deplossert.scope);
const template = Template.fromStack(deployAssert.scope);
template.resourceCountIs('AWS::Lambda::Function', 1);
template.resourceCountIs('Custom::DeployAssert@HttpCallexamplecomtest', 2);
});
Expand Down