File tree Expand file tree Collapse file tree 2 files changed +47
-0
lines changed Expand file tree Collapse file tree 2 files changed +47
-0
lines changed Original file line number Diff line number Diff line change @@ -662,6 +662,16 @@ func (rm *resourceManager) newCustomUpdateRequestPayload(
662
662
}
663
663
res .SetCloudwatchLogsExportConfiguration (f24 )
664
664
}
665
+ if delta .DifferentAt ("Spec.PerformanceInsightsEnabled" ) && desired .ko .Spec .EnablePerformanceInsights != nil {
666
+ res .SetEnablePerformanceInsights (* desired .ko .Spec .EnablePerformanceInsights )
667
+ }
668
+ if delta .DifferentAt ("Spec.PerformanceInsightsKMSKeyID" ) && desired .ko .Spec .PerformanceInsightsKMSKeyID != nil {
669
+ res .SetPerformanceInsightsKMSKeyId (* desired .ko .Spec .PerformanceInsightsKMSKeyID )
670
+ }
671
+ if delta .DifferentAt ("Spec.PerformanceInsightsRetentionPeriod" ) && desired .ko .Spec .PerformanceInsightsRetentionPeriod != nil {
672
+ res .SetPerformanceInsightsRetentionPeriod (* desired .ko .Spec .PerformanceInsightsRetentionPeriod )
673
+ }
674
+
665
675
return res , nil
666
676
}
667
677
Original file line number Diff line number Diff line change 15
15
"""
16
16
17
17
import time
18
+ import logging
18
19
19
20
import pytest
20
21
from acktest .k8s import resource as k8s
@@ -448,3 +449,39 @@ def test_restore_cluster_to_latest_point_in_time(
448
449
pass
449
450
450
451
db_cluster .wait_until_deleted (db_cluster_id )
452
+
453
+
454
+ def test_enable_performance_insight (
455
+ self , aurora_postgres_cluster_log_exports ,
456
+ ):
457
+ ref , _ , db_cluster_id = aurora_postgres_cluster_log_exports
458
+ db_cluster .wait_until (
459
+ db_cluster_id ,
460
+ db_cluster .status_matches ('available' ),
461
+ )
462
+
463
+ current = db_cluster .get (db_cluster_id )
464
+ assert current is not None
465
+
466
+ performanceInsightsEnabled = current .get ("PerformanceInsightsEnabled" , None )
467
+ assert performanceInsightsEnabled is None
468
+
469
+ k8s .patch_custom_resource (
470
+ ref ,
471
+ {"spec" : {"performanceInsightsEnabled" : True }},
472
+ )
473
+
474
+ db_cluster .wait_until (
475
+ db_cluster_id ,
476
+ db_cluster .status_matches ("available" ),
477
+ )
478
+
479
+ time .sleep (MODIFY_WAIT_AFTER_SECONDS )
480
+
481
+ latest = db_cluster .get (db_cluster_id )
482
+ assert latest is not None
483
+
484
+ logging .info ("+++++" )
485
+ logging .info (latest )
486
+ performanceInsightsEnabled = current .get ("PerformanceInsightsEnabled" , None )
487
+ assert performanceInsightsEnabled == True
You can’t perform that action at this time.
0 commit comments