diff --git a/e2e/keywords/node.resource b/e2e/keywords/node.resource index 1ce6618428..b68b0e2845 100644 --- a/e2e/keywords/node.resource +++ b/e2e/keywords/node.resource @@ -73,5 +73,8 @@ Stress the CPU of all ${role} nodes Stress the CPU of all volume nodes stress_node_cpu_by_volumes ${volume_list} +Stress the memory of all ${role} nodes + stress_node_memory_by_role ${role} + Stress the memory of all volume nodes stress_node_memory_by_volumes ${volume_list} diff --git a/e2e/libs/keywords/node_keywords.py b/e2e/libs/keywords/node_keywords.py index 048b84749d..87ab3afd9b 100644 --- a/e2e/libs/keywords/node_keywords.py +++ b/e2e/libs/keywords/node_keywords.py @@ -50,5 +50,8 @@ def stress_node_cpu_by_role(self, role): def stress_node_cpu_by_volumes(self, volume_names): self.stress.cpu(list_node_names_by_volumes(volume_names)) + def stress_node_memory_by_role(self, role): + self.stress.memory(list_node_names_by_role(role)) + def stress_node_memory_by_volumes(self, volume_names): self.stress.memory(list_node_names_by_volumes(volume_names)) diff --git a/e2e/tests/stress_memory.robot b/e2e/tests/stress_memory.robot index 11acba51dc..eda2cfef5c 100644 --- a/e2e/tests/stress_memory.robot +++ b/e2e/tests/stress_memory.robot @@ -54,3 +54,21 @@ Stress Volume Node Memory When Volume Is Online Expanding Then Wait for statefulset 0 volume size expanded And Check statefulset 0 data is intact END + +Stress Volume Node Memory When Volume Is Offline Expanding + @{data_checksum_list} = Create List + Set Test Variable ${data_checksum_list} + + Given Create statefulset 0 with rwo volume + And Write 1024 MB data to statefulset 0 + + FOR ${i} IN RANGE ${LOOP_COUNT} + And Scale down statefulset 0 to detach volume + And Stress the memory of all worker nodes + + When Expand statefulset 0 volume by 100 MiB + + Then Wait for statefulset 0 volume size expanded + And Scale up statefulset 0 to attach volume + And Check statefulset 0 data is intact + END