@@ -30,6 +30,7 @@ let stack: Stack;
30
30
let kmsKey : IKey ;
31
31
let vpc : IVpc ;
32
32
let template : Template ;
33
+ let annotations : Annotations ;
33
34
let defaultAuroraProps : AuroraProps ;
34
35
let aurora : Aurora ;
35
36
@@ -39,6 +40,7 @@ const createAurora = function (props?: AuroraProps) {
39
40
...props ,
40
41
} ) ;
41
42
template = Template . fromStack ( stack ) ;
43
+ annotations = Annotations . fromStack ( stack ) ;
42
44
} ;
43
45
44
46
describe ( 'Aurora' , ( ) => {
@@ -167,6 +169,24 @@ describe('Aurora', () => {
167
169
defaultAuroraProps = { databaseName, kmsKey, vpc } ;
168
170
} ) ;
169
171
172
+ describe ( 'multiuser rotation and proxy incompatibility' , ( ) => {
173
+ const incompatibilityWarning = Match . stringLikeRegexp (
174
+ 'AWS RDS Proxy is fundamentally incompatible with the MultiUser rotation scheme.' ,
175
+ ) ;
176
+ it ( 'warns when both are enabled' , ( ) => {
177
+ createAurora ( defaultAuroraProps ) ;
178
+ annotations . hasWarning ( '*' , incompatibilityWarning ) ;
179
+ } ) ;
180
+ it ( 'does not warn when multiuser rotation disabled' , ( ) => {
181
+ createAurora ( { ...defaultAuroraProps , skipAddRotationMultiUser : true } ) ;
182
+ annotations . hasNoWarning ( '*' , incompatibilityWarning ) ;
183
+ } ) ;
184
+ it ( 'does not warn when proxy disabled' , ( ) => {
185
+ createAurora ( { ...defaultAuroraProps , skipProxy : true } ) ;
186
+ annotations . hasNoWarning ( '*' , incompatibilityWarning ) ;
187
+ } ) ;
188
+ } ) ;
189
+
170
190
it ( 'activityStream' , ( ) => {
171
191
const postgresEngineVersion = AuroraPostgresEngineVersion . VER_11_16 ;
172
192
createAurora ( { ...defaultAuroraProps , activityStream : true , postgresEngineVersion } ) ;
0 commit comments