You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
thrownewValidationError('Cluster level enhanced monitoring must be set for Aurora Limitless Database. Please set \'monitoringInterval\' and enable \'enableClusterLevelEnhancedMonitoring\'.',this);
848
-
}
849
-
if(props.writer||props.readers){
850
-
thrownewValidationError('Aurora Limitless Database does not support readers or writer instances.',this);
message: ()=>'Cluster level enhanced monitoring must be set for Aurora Limitless Database. Please set \'monitoringInterval\' and enable \'enableClusterLevelEnhancedMonitoring\'',
Copy file name to clipboardexpand all lines: packages/aws-cdk-lib/aws-rds/test/cluster.test.ts
+9-9
Original file line number
Diff line number
Diff line change
@@ -268,7 +268,7 @@ describe('cluster new api', () => {
268
268
storageType: DBClusterStorageType.AURORA_IOPT1,
269
269
cloudwatchLogsExports: ['postgresql'],
270
270
});
271
-
}).toThrow('Performance Insights must be enabled for Aurora Limitless Database.');
271
+
}).toThrow('DatabaseCluster initialization failed due to the following validation error(s):\n- Performance Insights must be enabled for Aurora Limitless Database\n- Performance Insights retention period must be set to at least 31 days for Aurora Limitless Database');
272
272
});
273
273
274
274
test('throw error for invalid performance insights retention period',()=>{
@@ -292,7 +292,7 @@ describe('cluster new api', () => {
292
292
storageType: DBClusterStorageType.AURORA_IOPT1,
293
293
cloudwatchLogsExports: ['postgresql'],
294
294
});
295
-
}).toThrow('Performance Insights retention period must be set at least 31 days for Aurora Limitless Database.');
295
+
}).toThrow('DatabaseCluster initialization failed due to the following validation error(s):\n- Performance Insights retention period must be set to at least 31 days for Aurora Limitless Database');
296
296
});
297
297
298
298
test('throw error for not specifying monitoring interval',()=>{
@@ -316,7 +316,7 @@ describe('cluster new api', () => {
316
316
storageType: DBClusterStorageType.AURORA_IOPT1,
317
317
cloudwatchLogsExports: ['postgresql'],
318
318
});
319
-
}).toThrow('Cluster level enhanced monitoring must be set for Aurora Limitless Database. Please set \'monitoringInterval\' and enable \'enableClusterLevelEnhancedMonitoring\'.');
319
+
}).toThrow('DatabaseCluster initialization failed due to the following validation error(s):\n- Cluster level enhanced monitoring must be set for Aurora Limitless Database. Please set \'monitoringInterval\' and enable \'enableClusterLevelEnhancedMonitoring\'');
320
320
});
321
321
322
322
test.each([false,undefined])('throw error for configuring enhanced monitoring at the instance level',(enableClusterLevelEnhancedMonitoring)=>{
@@ -341,7 +341,7 @@ describe('cluster new api', () => {
341
341
cloudwatchLogsExports: ['postgresql'],
342
342
instances: 1,
343
343
});
344
-
}).toThrow('Cluster level enhanced monitoring must be set for Aurora Limitless Database. Please set \'monitoringInterval\' and enable \'enableClusterLevelEnhancedMonitoring\'.');
344
+
}).toThrow('Cluster level enhanced monitoring must be set for Aurora Limitless Database. Please set \'monitoringInterval\' and enable \'enableClusterLevelEnhancedMonitoring\'');
345
345
});
346
346
347
347
test('throw error for specifying writer instance',()=>{
@@ -366,7 +366,7 @@ describe('cluster new api', () => {
366
366
cloudwatchLogsExports: ['postgresql'],
367
367
writer: ClusterInstance.serverlessV2('writer'),
368
368
});
369
-
}).toThrow('Aurora Limitless Database does not support readers or writer instances.');
369
+
}).toThrow('DatabaseCluster initialization failed due to the following validation error(s):\n- Aurora Limitless Database does not support reader or writer instances');
370
370
});
371
371
372
372
test.each([
@@ -395,7 +395,7 @@ describe('cluster new api', () => {
395
395
storageType: DBClusterStorageType.AURORA_IOPT1,
396
396
cloudwatchLogsExports: ['postgresql'],
397
397
});
398
-
}).toThrow(`Aurora Limitless Database requires an engine version that supports it, got ${engine.engineVersion?.fullVersion}`);
398
+
}).toThrow(`DatabaseCluster initialization failed due to the following validation error(s):\n- Aurora Limitless Database requires an engine version that supports it, got:${engine.engineVersion?.fullVersion}`);
399
399
});
400
400
401
401
test('throw error for invalid storage type',()=>{
@@ -443,7 +443,7 @@ describe('cluster new api', () => {
443
443
storageType: DBClusterStorageType.AURORA_IOPT1,
444
444
cloudwatchLogsExports,
445
445
});
446
-
}).toThrow('Aurora Limitless Database requires CloudWatch Logs exports to be set.');
446
+
}).toThrow('DatabaseCluster initialization failed due to the following validation error(s):\n- Aurora Limitless Database requires CloudWatch Logs exports to be set');
}).toThrow('DatabaseCluster initialization failed due to the following validation error(s):\n- `enablePerformanceInsights` disabled, but `performanceInsightRetention` or `performanceInsightEncryptionKey` was set');
2134
2134
});
2135
2135
2136
2136
test('throws if performanceInsightEncryptionKey is set but performance insights is disabled',()=>{
}).toThrow('DatabaseCluster initialization failed due to the following validation error(s):\n- `enablePerformanceInsights` disabled, but `performanceInsightRetention` or `performanceInsightEncryptionKey` was set');
2146
2146
});
2147
2147
2148
2148
test('warn if performance insights is enabled at cluster level but disabled on writer and reader instances',()=>{
consterrorMessage=`${className} initialization failed due to the following validation error(s):\n${validationErrors.map(error=>`- ${error}`).join('\n')}`;
0 commit comments