Skip to content

Commit

Permalink
test(negative): stress volume node memory when volume is offline expa…
Browse files Browse the repository at this point in the history
…nding

ref: 6982

Signed-off-by: Chin-Ya Huang <chin-ya.huang@suse.com>
  • Loading branch information
c3y1huang committed Nov 3, 2023
1 parent 725357b commit 8f654fd
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
3 changes: 3 additions & 0 deletions e2e/keywords/node.resource
Original file line number Diff line number Diff line change
Expand Up @@ -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}
3 changes: 3 additions & 0 deletions e2e/libs/keywords/node_keywords.py
Original file line number Diff line number Diff line change
Expand Up @@ -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))
18 changes: 18 additions & 0 deletions e2e/tests/stress_memory.robot
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 8f654fd

Please sign in to comment.