File tree 2 files changed +23
-1
lines changed
packages/@aws-cdk/aws-pipes-targets-alpha
2 files changed +23
-1
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ export class SnsTarget implements ITarget {
34
34
}
35
35
36
36
bind ( pipe : IPipe ) : TargetConfig {
37
- if ( ! this . topicParameters ) {
37
+ if ( ! this . topicParameters ?. inputTransformation ) {
38
38
return {
39
39
targetParameters : { } ,
40
40
} ;
Original file line number Diff line number Diff line change @@ -59,6 +59,28 @@ describe('sns', () => {
59
59
} ) ;
60
60
} ) ;
61
61
62
+ it ( 'should handle an empty parameter object' , ( ) => {
63
+ // ARRANGE
64
+ const app = new App ( ) ;
65
+ const stack = new Stack ( app , 'TestStack' ) ;
66
+ const topic = new Topic ( stack , 'MyTopic' , { } ) ;
67
+
68
+ const target = new SnsTarget ( topic , { } ) ;
69
+
70
+ new Pipe ( stack , 'MyPipe' , {
71
+ source : new TestSource ( ) ,
72
+ target,
73
+ } ) ;
74
+
75
+ // ACT
76
+ const template = Template . fromStack ( stack ) ;
77
+
78
+ // ASSERT
79
+ template . hasResourceProperties ( 'AWS::Pipes::Pipe' , {
80
+ TargetParameters : { } ,
81
+ } ) ;
82
+ } ) ;
83
+
62
84
it ( 'should grant pipe role publish access' , ( ) => {
63
85
// ARRANGE
64
86
const app = new App ( ) ;
You can’t perform that action at this time.
0 commit comments