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
Assert expected spec with kubernetes resources and all fields of aws resources (#65)
Issue #, if available:
Current test framework only checks whether ResourceSynced is true or not for Kubernetes resource. It doesn't check spec of Kubernetes resource, and it doesn't check aws resource.
Description of changes:
1. Add a comparison between expectations and Spec of Kubernetes resources to assert.
2. Add a comparison between expectations and MemoryDB resources to assert.
3. Modify test files to fit new test framework.
4. Fix issue 1 and 2.
5. Comment issue 3 and will create a new PR to investigate.
Note: Add custom logic of comparison to tags, parameterNameValues, clusterName, subnetIDs. New custom logic also shows details if assertError happens, which is easier for debugging.
Issues caught by latest test framework.
1. MemoryDB doesn't support parameter group creation with parameterNameValues change.
2. Controller only reset parameters in parameter group to default when desired parameters have empty value. Controller doesn't update values of parameters.
3. Tags for cluster and snapshot cannot be updated.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
assertexpected_value==actual_condition.get("status"), f"Condition status mismatch. Expected condition: {condition_name} - {expected_value} but found {actual_condition}"
assertexpected_value==k8s_resource_condition.get("status"), f"Condition status mismatch. Expected condition: {condition_name} - {expected_value} but found {k8s_resource_condition}"
assertcondition_value==actual_condition.get("status"), f"Condition status mismatch. Expected condition: {condition_name} - {expected_value} but found {actual_condition}"
200
+
assertk8s_resource_conditionisnotNone
201
+
assertcondition_value==k8s_resource_condition.get("status"), f"Condition status mismatch. Expected condition: {condition_name} - {expected_value} but found {k8s_resource_condition}"
183
202
ifcondition_messageisnotNone:
184
-
assertcondition_message==actual_condition.get("message"), f"Condition message mismatch. Expected condition: {condition_name} - {expected_value} but found {actual_condition}"
203
+
assertcondition_message==k8s_resource_condition.get("message"), f"Condition message mismatch. Expected condition: {condition_name} - {expected_value} but found {k8s_resource_condition}"
185
204
186
205
else:
187
206
raiseException(f"Condition {condition_name} is provided with invalid value: {expected_value} ")
0 commit comments