Update robot codes with latest directives
Changes:
- Non local variable is not uppercase
- The assignment sign is not consistent within the file.
Expected = but instead of blank spaces
- Run KeyWord If is deprecated since Robot
Framework version 5.*, use 'IF' instead
Tested:
- Checked using robot dry-run to make sure the
syntax is not broken
Change-Id: I08a142a18a9066abdd6494bcddc167122564fd17
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/network/test_network_nping.robot b/network/test_network_nping.robot
index 6d1e72a..a401f9b 100644
--- a/network/test_network_nping.robot
+++ b/network/test_network_nping.robot
@@ -50,15 +50,13 @@
# and rate at which packets to be sent, should be given in command line
# by default it sends 100 TCP packets at 5 packets/second.
- ${cmd_buff}= Run Keyword If '${packet_type}' == 'icmp'
- ... Set Variable
- ... echo ${CLIENT_PASSWORD} | sudo -S nping --delay ${delay} ${host} -c ${count} --${packet_type}
- ... ELSE
- ... Set variable
- ... echo ${CLIENT_PASSWORD} | sudo -S nping --delay ${delay} ${host} -c ${count} -p ${port} --${packet_type}
- ${rc} ${output} Run And Return RC And Output ${cmd_buff}
+ ${cmd_buff}= Set Variable If '${packet_type}' == 'icmp'
+ ... echo ${CLIENT_PASSWORD} | sudo -S nping --delay ${delay} ${host} -c ${count} --${packet_type}
+ ... echo ${CLIENT_PASSWORD} | sudo -S nping --delay ${delay} ${host} -c ${count} -p ${port} --${packet_type}
+
+ ${rc} ${output}= Run And Return RC And Output ${cmd_buff}
Should Be Equal As Integers ${rc} 0 msg=Command execution failed.
- ${packet_loss} Get Packet Loss ${host} ${output}
+ ${packet_loss}= Get Packet Loss ${host} ${output}
RETURN ${packet_loss}
Get Packet Loss