[PATCH openbmc-test-automation 50/60] Added SSL tests
OpenBMC Patches
openbmc-patches at stwcx.xyz
Tue Jan 12 03:50:16 AEDT 2016
From: Manjunath A Kumatagi <mkumatag at in.ibm.com>
---
tests/security/test_ssl.robot | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)
create mode 100644 tests/security/test_ssl.robot
diff --git a/tests/security/test_ssl.robot b/tests/security/test_ssl.robot
new file mode 100644
index 0000000..e4eac40
--- /dev/null
+++ b/tests/security/test_ssl.robot
@@ -0,0 +1,28 @@
+*** Settings ***
+Documentation This testsuite is for testing SSL connection to OpenBMC
+Suite Teardown Delete All Sessions
+
+Resource ../lib/rest_client.robot
+Resource ../lib/resource.txt
+
+Library RequestsLibrary.RequestsKeywords
+
+*** Test Cases ***
+Test SSL Connection
+ [Documentation] This testcase is for testing the SSL connection to the
+ ... OpenBMC machine.
+ Create Session openbmc https://${OPENBMC_HOST}/
+ ${resp}= Get Request openbmc https://${OPENBMC_HOST}/org/openbmc/inventory/list
+ Should Be Equal As Strings ${resp.status_code} ${HTTP_OK}
+ ${jsondata}= To Json ${resp.content}
+ Should Not Be Empty ${jsondata}
+
+Test non-SSL Connection - Negative
+ [Documentation] This testcase is for test to check OpenBMC machine
+ ... will not accepts the non-secure connection that is with http.
+ ... Expected Response code is - 400
+ Create Session openbmc http://${OPENBMC_HOST}/
+ ${resp}= Get Request openbmc http://${OPENBMC_HOST}/org/openbmc/inventory/list
+ Should Be Equal As Strings ${resp.status_code} ${HTTP_BAD_REQUEST}
+ ${jsondata}= To Json ${resp.content}
+ Should Be Empty ${jsondata}
\ No newline at end of file
--
2.6.4
More information about the openbmc
mailing list