aboutsummaryrefslogtreecommitdiffstats
path: root/tests/dcaegen2-services-pmsh/testcases
diff options
context:
space:
mode:
authorAndyWalshe <andy.walshe@est.tech>2020-02-13 15:05:21 +0000
committerAndyWalshe <andy.walshe@est.tech>2020-02-25 11:37:49 +0000
commitb412c7bd0484b036f5cd62e5bf1f7c966bf59310 (patch)
treef958b03ec94e34c7d51451c7e7cb94abd06ab659 /tests/dcaegen2-services-pmsh/testcases
parent3dcf79f91db846d54ae9d4d537b7173c7bd44a5e (diff)
Add PMSH CSITs
Signed-off-by: AndyWalshe <andy.walshe@est.tech> Issue-ID: DCAEGEN2-1842 Change-Id: I69e824f9ed74137f217285381ab5efe55010f4dc
Diffstat (limited to 'tests/dcaegen2-services-pmsh/testcases')
-rw-r--r--tests/dcaegen2-services-pmsh/testcases/__init__.robot2
-rw-r--r--tests/dcaegen2-services-pmsh/testcases/pmsh.robot38
2 files changed, 40 insertions, 0 deletions
diff --git a/tests/dcaegen2-services-pmsh/testcases/__init__.robot b/tests/dcaegen2-services-pmsh/testcases/__init__.robot
new file mode 100644
index 00000000..47abe8bb
--- /dev/null
+++ b/tests/dcaegen2-services-pmsh/testcases/__init__.robot
@@ -0,0 +1,2 @@
+*** Settings ***
+Documentation PMSH Testcases
diff --git a/tests/dcaegen2-services-pmsh/testcases/pmsh.robot b/tests/dcaegen2-services-pmsh/testcases/pmsh.robot
new file mode 100644
index 00000000..74a575cd
--- /dev/null
+++ b/tests/dcaegen2-services-pmsh/testcases/pmsh.robot
@@ -0,0 +1,38 @@
+*** Settings ***
+Documentation Testing PMSH functionality
+Library OperatingSystem
+Library RequestsLibrary
+Library String
+
+Test Setup Create Session pmsh_session ${PMSH_BASE_URL}
+Test Teardown Delete All Sessions
+
+
+*** Variables ***
+${PMSH_BASE_URL} https://${PMSH_IP}:8443
+${HEALTHCHECK_ENDPOINT} /healthcheck
+
+
+*** Test Cases ***
+Verify Health Check returns 200 when a REST GET request to healthcheck url
+ [Tags] PMSH_01
+ [Documentation] Verify Health Check returns 200 when a REST GET request to healthcheck url
+ [Timeout] 1 minute
+ ${resp}= Get Request pmsh_session ${HEALTHCHECK_ENDPOINT}
+ VerifyResponse ${resp.status_code} 200
+
+Verify Health Check response includes healthy status
+ [Tags] PMSH_02
+ [Documentation] Verify Health Check response includes healthy status
+ [Timeout] 1 minute
+ ${resp}= Get Request pmsh_session ${HEALTHCHECK_ENDPOINT}
+ VerifyResponseContains ${resp.text} healthy
+
+*** Keywords ***
+VerifyResponse
+ [Arguments] ${actual_response_value} ${expected_response_value}
+ Should Be Equal As Strings ${actual_response_value} ${expected_response_value}
+
+VerifyResponseContains
+ [Arguments] ${response_content} ${string_to_check_for}
+ Should Contain ${response_content} ${string_to_check_for}