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
test(robot): move volume endpoint check logic to Python keyword
- Extracting the check into a new Python keyword `check_volume_endpoint_on_node`,
which asserts the endpoint exists and raises a clear error if not.
- simplify node-level directory check to always log as WARNING.
longhorn/longhorn#13256
Signed-off-by: Roger Yao <roger.yao@suse.com>
${volume_name} = Run Keyword If '${resource_kind}' == 'volume'
171
171
... Set Variable ${resource_name}
172
172
... ELSE
173
173
... get_workload_volume_name ${resource_name}
174
174
${node_name} = get_volume_node ${volume_name}
175
-
${result} = execute_command_on_node ls -l /dev/longhorn/${volume_name}${node_name}
176
-
177
-
# Check if result is empty or contains error
178
-
${result_stripped} = Strip String ${result}
179
-
${is_empty} = Run Keyword And Return Status Should Be Empty ${result_stripped}
180
-
${has_error} = Run Keyword And Return Status Should Contain ${result} No such file or directory
181
-
182
-
IF ${is_empty} or ${has_error}
183
-
${warning_msg} = Set Variable /dev/longhorn/${volume_name} is empty or doesn't exist on node=${node_name}, ${resource_kind}=${resource_name}, volume=${volume_name}
184
-
Log ${warning_msg} level=WARN console=True
185
-
ELSE
186
-
${message} = Set Variable node=${node_name}, volume=${volume_name}\n/dev/longhorn/${volume_name}:\n${result}
0 commit comments