XYZ Network- Fix empty IP and gateway issues.
This resolves openbmc/openbmc-test-automation#1115
Change-Id: I39c0caa32061864395103c208cf8681ae7705662
Signed-off-by: Prashanth Katti <prkatti1@in.ibm.com>
diff --git a/extended/test_network.robot b/extended/test_network.robot
index 925726b..211586a 100644
--- a/extended/test_network.robot
+++ b/extended/test_network.robot
@@ -424,7 +424,7 @@
# ip_address IP address of the system.
# ip_info List of IP address and prefix length values.
- Should Contain Match ${ip_info} ${ip_address}*
+ Should Contain Match ${ip_info} ${ip_address}/*
... msg=IP address does not exist.
Verify IP Address Via REST And Delete
@@ -464,8 +464,14 @@
# gateway_ip Gateway IP address.
${route_info}= Get BMC Route Info
- Should Contain ${route_info} ${gateway_ip}
- ... msg=Gateway IP address not matching.
+
+ # If gateway IP is empty or 0.0.0.0 it will not have route entry.
+
+ Run Keyword If '${gateway_ip}' == '0.0.0.0'
+ ... Pass Execution Gatway IP is "0.0.0.0".
+ ... ELSE
+ ... Should Contain ${route_info} ${gateway_ip}
+ ... msg=Gateway IP address not matching.
Validate MAC on BMC
[Documentation] Validate MAC on BMC.