xref: /openbmc/openbmc-test-automation/security/test_ssl.robot (revision feb79d60e26d78a6e91521ee41b1af5b8ba71f4c)
1*** Settings ***
2Documentation     This testsuite is for testing SSL connection to OpenBMC.
3Suite Teardown    Delete All Sessions
4
5Resource          ../lib/rest_client.robot
6Resource          ../lib/resource.robot
7Resource          ../lib/openbmc_ffdc.robot
8Test Teardown     FFDC On Test Case Fail
9
10Test Tags         Test_SSL
11
12*** Test Cases ***
13
14Test SSL Connection
15    [Documentation]  This testcase is for testing the SSL connection to the
16    ...  OpenBMC machine.
17    [Tags]  Test_SSL_Connection
18    Initialize OpenBMC
19
20Test Non SSL Connection To Port 80
21    [Documentation]  Test that OpenBMC machine does not accept the non-secure
22    ...  http connection at port 80 and would expect a connection error.
23    [Tags]  Test_Non_SSL_Connection_To_Port_80
24
25    Create Session  openbmc  http://${OPENBMC_HOST}/  timeout=3
26    Run Keyword And Expect Error  *ConnectTimeoutError*  GET On Session  openbmc  /list
27
28Test Non SSL Connection To HTTPS Port
29    [Documentation]  Test that OpenBmc does not accept the non-secure
30    ...  http connection at port ${HTTPS_PORT} and would expect a connection error.
31    [Tags]  Test_Non_SSL_Connection_To_HTTPS_Port
32
33    Create Session  openbmc  http://${OPENBMC_HOST}:${HTTPS_PORT}/  timeout=3
34    Run Keyword And Expect Error  ConnectionError*  GET On Session  openbmc  /list
35