Skip to content

Commit

Permalink
remove assertion from integ-test
Browse files Browse the repository at this point in the history
  • Loading branch information
yamatatsu committed Jul 30, 2022
1 parent 2895b0b commit aa887ee
Showing 1 changed file with 2 additions and 25 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import * as iot from '@aws-cdk/aws-iot';
import * as iotevents from '@aws-cdk/aws-iotevents';
import * as logs from '@aws-cdk/aws-logs';
import * as cdk from '@aws-cdk/core';
import { IntegTest, ExpectedResult } from '@aws-cdk/integ-tests';
import { IntegTest } from '@aws-cdk/integ-tests';
import * as actions from '../../lib';

class TestStack extends cdk.Stack {
Expand Down Expand Up @@ -47,29 +47,6 @@ class TestStack extends cdk.Stack {
// App
const app = new cdk.App();
const stack = new TestStack(app, 'iotevents-put-message-action-test-stack');
const integ = new IntegTest(app, 'iotevents', { testCases: [stack] });

// WHEN
const apiCallOfPublish = integ.assertions.awsApiCall('IotData', 'publish', {
topic: 'device/my-device/data',
payload: JSON.stringify([
{ payload: { deviceId: '001' } },
{ payload: { deviceId: '002' } },
]),
});

const apiCallOfListDetectors = integ.assertions.awsApiCall('IoteventsData', 'listDetectors', {
detectorModelName: stack.detectorModelName,
});

apiCallOfListDetectors.node.addDependency(apiCallOfPublish);

// THEN
apiCallOfListDetectors.expect(ExpectedResult.objectLike({
detectorSummaries: [
ExpectedResult.objectLike({ keyValue: '001' }),
ExpectedResult.objectLike({ keyValue: '002' }),
],
}));
new IntegTest(app, 'iotevents', { testCases: [stack] });

app.synth();

0 comments on commit aa887ee

Please sign in to comment.