From aa887ee2d600391f62211ccf43a894c5eba6c9b7 Mon Sep 17 00:00:00 2001 From: yamatatsu Date: Sat, 30 Jul 2022 23:45:54 +0900 Subject: [PATCH] remove assertion from integ-test --- .../iot/integ.iotevents-put-message-action.ts | 27 ++----------------- 1 file changed, 2 insertions(+), 25 deletions(-) diff --git a/packages/@aws-cdk/aws-iot-actions/test/iot/integ.iotevents-put-message-action.ts b/packages/@aws-cdk/aws-iot-actions/test/iot/integ.iotevents-put-message-action.ts index 00448d85ac16e..17b0f0c8058e8 100644 --- a/packages/@aws-cdk/aws-iot-actions/test/iot/integ.iotevents-put-message-action.ts +++ b/packages/@aws-cdk/aws-iot-actions/test/iot/integ.iotevents-put-message-action.ts @@ -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 { @@ -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();