Mac address set and error case moved to extended
Resolves openbmc/openbmc-test-automation#136
Change-Id: I8044f9f116846eccaff34ba4add4e1d2c725a9b5
Signed-off-by: George Keishing <gkeishin@in.ibm.com>
diff --git a/extended/test_networkd_ext.robot b/extended/test_networkd_ext.robot
index 0b82030..555e5c9 100755
--- a/extended/test_networkd_ext.robot
+++ b/extended/test_networkd_ext.robot
@@ -103,6 +103,30 @@
should be true '${isIPfound}' == 'true' and '${isgatewayfound}' == 'true'
+Set invalid Mac address eth0 gg:hh:jj:kk:ll:mm error
+ [Tags] network_test Set_invalid_Mac_address
+ [Template] SetMacAddress_bad
+ [Documentation] This test case tries to set the invalid mac address
+ ... on the eth0 interface.
+ ... Expectation is that it should throw error.
+
+
+Set valid Mac address eth0 00:21:cc:73:91:dd ok
+ [Tags] network_test Set_valid_Mac_address
+ [Template] SetMacAddress_good
+ [Documentation] ***GOOD PATH***
+ ... This test case add the ip addresson the interface and validates
+ ... that ip address has been added or not.
+ ... Expectation is the ip address should get added.
+
+Revert old Mac address eth0 ${OLD_MAC_ADDRESS} ok
+ [Tags] network_test Revert_old_Mac_address
+ [Template] SetMacAddress_good
+ [Documentation] ***GOOD PATH***
+ ... This test case add the ip addresson the interface and validates
+ ... that ip address has been added or not.
+ ... Expectation is the ip address should get added.
+
***keywords***
Get networkInfo from the interface
@@ -136,3 +160,31 @@
should not be empty ${NEW_BMC_IP}
should not be empty ${NEW_GATEWAY}
should not be empty ${NEW_SUBNET_MASK}
+
+SetMacAddress_bad
+ [Arguments] ${intf} ${address} ${result}
+ ${arglist}= Create List ${intf} ${address}
+ ${args}= Create Dictionary data=@{arglist}
+ ${resp}= Call Method /org/openbmc/NetworkManager/Interface/ SetHwAddress data=${args}
+ should not be equal as strings ${resp.status_code} ${HTTP_OK}
+ ${json} = to json ${resp.content}
+ should be equal as strings ${json['status']} ${result}
+
+
+SetMacAddress_good
+ [Arguments] ${intf} ${address} ${result}
+ ${arglist}= Create List ${intf} ${address}
+ ${args}= Create Dictionary data=@{arglist}
+ ${resp}= Call Method /org/openbmc/NetworkManager/Interface/ SetHwAddress data=${args}
+ should be equal as strings ${resp.status_code} ${HTTP_OK}
+ ${json} = to json ${resp.content}
+ should be equal as strings ${json['status']} ${result}
+ Wait For Host To Ping ${OPENBMC_HOST}
+
+ Wait Until Keyword Succeeds 30 sec 5 sec Initialize OpenBMC
+
+ @{arglist}= Create List ${intf}
+ ${args}= Create Dictionary data=@{arglist}
+ ${resp}= Call Method /org/openbmc/NetworkManager/Interface/ GetHwAddress data=${args}
+ ${json} = to json ${resp.content}
+ should be equal as strings ${json['data']} ${address}
diff --git a/skip_list b/skip_list
index 18b1def..d7980be 100644
--- a/skip_list
+++ b/skip_list
@@ -14,7 +14,9 @@
#https://github.com/openbmc/openbmc-test-automation/issues/107
-e Set_valid_Mac_address
#https://github.com/openbmc/openbmc-test-automation/issues/107
--e Revert_old_Mac_address
+-e Revert_old_Mac_addres
+#https://github.com/openbmc/openbmc-test-automation/issues/137
+-e Set_invalid_Mac_address
#https://github.com/openbmc/openbmc-test-automation/issues/22
-e Validate_Heartbeat_LEDs_Test_Cases
-e Validate_Identify_LEDs_Test_Cases
diff --git a/tests/test_networkd.robot b/tests/test_networkd.robot
index c47007b..3b7ae88 100755
--- a/tests/test_networkd.robot
+++ b/tests/test_networkd.robot
@@ -127,32 +127,6 @@
Should Be Equal ${json['data']} STATIC
should be equal as strings ${json['status']} ok
-
-Set invalid Mac address eth0 gg:hh:jj:kk:ll:mm error
- [Tags] network_test
- [Template] SetMacAddress_bad
- [Documentation] This test case tries to set the invalid mac address
- ... on the eth0 interface.
- ... Expectation is that it should throw error.
-
-
-Set valid Mac address eth0 00:21:cc:73:91:dd ok
- [Tags] network_test Set_valid_Mac_address
- [Template] SetMacAddress_good
- [Documentation] ***GOOD PATH***
- ... This test case add the ip addresson the interface and validates
- ... that ip address has been added or not.
- ... Expectation is the ip address should get added.
-
-Revert old Mac address eth0 ${OLD_MAC_ADDRESS} ok
- [Tags] network_test Revert_old_Mac_address
- [Template] SetMacAddress_good
- [Documentation] ***GOOD PATH***
- ... This test case add the ip addresson the interface and validates
- ... that ip address has been added or not.
- ... Expectation is the ip address should get added.
-
-
***keywords***
Get networkInfo from the interface
@@ -184,32 +158,3 @@
should not be equal as strings ${resp.status_code} ${HTTP_OK}
${json} = to json ${resp.content}
should be equal as strings ${json['status']} ${result}
-
-
-SetMacAddress_bad
- [Arguments] ${intf} ${address} ${result}
- ${arglist}= Create List ${intf} ${address}
- ${args}= Create Dictionary data=@{arglist}
- ${resp}= Call Method /org/openbmc/NetworkManager/Interface/ SetHwAddress data=${args}
- should not be equal as strings ${resp.status_code} ${HTTP_OK}
- ${json} = to json ${resp.content}
- should be equal as strings ${json['status']} ${result}
-
-
-SetMacAddress_good
- [Arguments] ${intf} ${address} ${result}
- ${arglist}= Create List ${intf} ${address}
- ${args}= Create Dictionary data=@{arglist}
- ${resp}= Call Method /org/openbmc/NetworkManager/Interface/ SetHwAddress data=${args}
- should be equal as strings ${resp.status_code} ${HTTP_OK}
- ${json} = to json ${resp.content}
- should be equal as strings ${json['status']} ${result}
- Wait For Host To Ping ${OPENBMC_HOST}
-
- Wait Until Keyword Succeeds 30 sec 5 sec Initialize OpenBMC
-
- @{arglist}= Create List ${intf}
- ${args}= Create Dictionary data=@{arglist}
- ${resp}= Call Method /org/openbmc/NetworkManager/Interface/ GetHwAddress data=${args}
- ${json} = to json ${resp.content}
- should be equal as strings ${json['data']} ${address}