aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorBartosz Gardziejewski <bartosz.gardziejewski@nokia.com>2021-03-25 11:36:30 +0100
committerBartosz Gardziejewski <bartosz.gardziejewski@nokia.com>2021-03-25 14:57:56 +0100
commit26029b1d11455c455d16abd3e0e7c59ff85fdb6e (patch)
treec5be24700932bb4b7e69b588693fcf1b9a03bed1 /tests
parent1acefd84302a7ffa1981a270a7a8a2f17f71c271 (diff)
Add healthcheck test for Netconf Server
Signed-off-by: Bartosz Gardziejewski <bartosz.gardziejewski@nokia.com> Change-Id: I656dfb4b88f65ff37c1f8253c686163a499b9674 Issue-ID: INT-1869
Diffstat (limited to 'tests')
-rw-r--r--tests/integration/nfsimulator/netconf-server/__init__.robot2
-rw-r--r--tests/integration/nfsimulator/netconf-server/netconf-server-rest-test.robot12
-rw-r--r--tests/integration/nfsimulator/netconf-server/resources/netconf-server-keywords.robot12
-rw-r--r--tests/integration/nfsimulator/netconf-server/resources/netconf-server-properties.robot3
4 files changed, 29 insertions, 0 deletions
diff --git a/tests/integration/nfsimulator/netconf-server/__init__.robot b/tests/integration/nfsimulator/netconf-server/__init__.robot
new file mode 100644
index 00000000..aa8babbc
--- /dev/null
+++ b/tests/integration/nfsimulator/netconf-server/__init__.robot
@@ -0,0 +1,2 @@
+*** Settings ***
+Documentation Integration - Netconf Server
diff --git a/tests/integration/nfsimulator/netconf-server/netconf-server-rest-test.robot b/tests/integration/nfsimulator/netconf-server/netconf-server-rest-test.robot
new file mode 100644
index 00000000..4805d680
--- /dev/null
+++ b/tests/integration/nfsimulator/netconf-server/netconf-server-rest-test.robot
@@ -0,0 +1,12 @@
+*** Settings ***
+Documentation Run healthcheck
+Library RequestsLibrary
+Resource ./resources/netconf-server-keywords.robot
+
+
+*** Test Cases ***
+
+Netconf Server Rest API Health Check
+ [Tags] Netconf-Server
+ [Documentation] Run healthcheck
+ Run Healthcheck
diff --git a/tests/integration/nfsimulator/netconf-server/resources/netconf-server-keywords.robot b/tests/integration/nfsimulator/netconf-server/resources/netconf-server-keywords.robot
new file mode 100644
index 00000000..94be035b
--- /dev/null
+++ b/tests/integration/nfsimulator/netconf-server/resources/netconf-server-keywords.robot
@@ -0,0 +1,12 @@
+*** Settings ***
+Library RequestsLibrary
+Resource ./netconf-server-properties.robot
+
+*** Keywords ***
+
+Run Healthcheck
+ [Documentation] Run Healthcheck
+ Create Session netconf_server_session ${NETCONF_SERVER_URL}
+ ${resp}= GET On Session netconf_server_session /healthcheck
+ Should Be Equal As Strings ${resp.status_code} 200
+ Should Be Equal As Strings ${resp.text} UP
diff --git a/tests/integration/nfsimulator/netconf-server/resources/netconf-server-properties.robot b/tests/integration/nfsimulator/netconf-server/resources/netconf-server-properties.robot
new file mode 100644
index 00000000..3903da7d
--- /dev/null
+++ b/tests/integration/nfsimulator/netconf-server/resources/netconf-server-properties.robot
@@ -0,0 +1,3 @@
+*** Variables ***
+
+${NETCONF_SERVER_URL} http://%{NETCONF_SERVER_IP}:%{NETCONF_SERVER_REST_PORT}