summaryrefslogtreecommitdiffstats
path: root/csit/tests
diff options
context:
space:
mode:
Diffstat (limited to 'csit/tests')
-rw-r--r--csit/tests/actuator/actuator.robot8
-rw-r--r--csit/tests/cps-admin/cps-admin.robot14
-rw-r--r--csit/tests/cps-data/cps-data.robot6
3 files changed, 15 insertions, 13 deletions
diff --git a/csit/tests/actuator/actuator.robot b/csit/tests/actuator/actuator.robot
index 3a0493d686..55ff40e076 100644
--- a/csit/tests/actuator/actuator.robot
+++ b/csit/tests/actuator/actuator.robot
@@ -1,5 +1,6 @@
# ============LICENSE_START=======================================================
# Copyright (c) 2021 Pantheon.tech.
+# Modifications Copyright (c) 2021 Bell Canada.
# ================================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -22,16 +23,17 @@ Documentation CPS - Actuator endpoints
Library Collections
Library RequestsLibrary
-Suite Setup Create Session CPS_HOST ${CPS_HOST}
+Suite Setup Create Session MANAGEMENT_URL http://${CPS_HOST}:${MANAGEMENT_PORT}/manage
*** Variables ***
*** Test Cases ***
Test Liveness Probe Endpoint
- ${response}= GET On Session CPS_HOST /manage/health/liveness expected_status=200
+ ${response}= GET On Session MANAGEMENT_URL health/liveness expected_status=200
Should Be Equal As Strings ${response.json()['status']} UP
Test Readiness Probe Endpoint
- ${response}= GET On Session CPS_HOST /manage/health/readiness expected_status=200
+ ${response}= GET On Session MANAGEMENT_URL health/readiness expected_status=200
Should Be Equal As Strings ${response.json()['status']} UP
+
diff --git a/csit/tests/cps-admin/cps-admin.robot b/csit/tests/cps-admin/cps-admin.robot
index 7e944ec6f7..43a46d3274 100644
--- a/csit/tests/cps-admin/cps-admin.robot
+++ b/csit/tests/cps-admin/cps-admin.robot
@@ -23,7 +23,7 @@ Library Collections
Library OperatingSystem
Library RequestsLibrary
-Suite Setup Create Session CPS_HOST ${CPS_HOST}
+Suite Setup Create Session CPS_URL http://${CPS_HOST}:${CPS_PORT}
*** Variables ***
@@ -40,7 +40,7 @@ Create Dataspace
${uri}= Set Variable ${basePath}/v1/dataspaces
${params}= Create Dictionary dataspace-name=${dataspaceName}
${headers}= Create Dictionary Authorization=${auth}
- ${response}= POST On Session CPS_HOST ${uri} params=${params} headers=${headers}
+ ${response}= POST On Session CPS_URL ${uri} params=${params} headers=${headers}
Should Be Equal As Strings ${response.status_code} 201
Create Schema Set from YANG file
@@ -50,7 +50,7 @@ Create Schema Set from YANG file
${fileTuple}= Create List test.yang ${fileData} application/zip
&{files}= Create Dictionary file=${fileTuple}
${headers}= Create Dictionary Authorization=${auth}
- ${response}= POST On Session CPS_HOST ${uri} files=${files} params=${params} headers=${headers}
+ ${response}= POST On Session CPS_URL ${uri} files=${files} params=${params} headers=${headers}
Should Be Equal As Strings ${response.status_code} 201
Create Schema Set from ZIP file
@@ -60,13 +60,13 @@ Create Schema Set from ZIP file
${fileTuple}= Create List test.zip ${fileData} application/zip
&{files}= Create Dictionary file=${fileTuple}
${headers}= Create Dictionary Authorization=${auth}
- ${response}= POST On Session CPS_HOST ${uri} files=${files} params=${params} headers=${headers}
+ ${response}= POST On Session CPS_URL ${uri} files=${files} params=${params} headers=${headers}
Should Be Equal As Strings ${response.status_code} 201
Get Schema Set info
${uri}= Set Variable ${basePath}/v1/dataspaces/${dataspaceName}/schema-sets/${schemaSetName}
${headers}= Create Dictionary Authorization=${auth}
- ${response}= Get On Session CPS_HOST ${uri} headers=${headers} expected_status=200
+ ${response}= Get On Session CPS_URL ${uri} headers=${headers} expected_status=200
${responseJson}= Set Variable ${response.json()}
Should Be Equal As Strings ${responseJson['name']} ${schemaSetName}
Should Be Equal As Strings ${responseJson['dataspaceName']} ${dataspaceName}
@@ -75,13 +75,13 @@ Create Anchor
${uri}= Set Variable ${basePath}/v1/dataspaces/${dataspaceName}/anchors
${params}= Create Dictionary schema-set-name=${schemaSetName} anchor-name=${anchorName}
${headers}= Create Dictionary Authorization=${auth}
- ${response}= POST On Session CPS_HOST ${uri} params=${params} headers=${headers}
+ ${response}= POST On Session CPS_URL ${uri} params=${params} headers=${headers}
Should Be Equal As Strings ${response.status_code} 201
Get CPS RAN Schema Set info
${uri}= Set Variable ${basePath}/v1/dataspaces/${ranDataspaceName}/schema-sets/${ranSchemaSetName}
${headers}= Create Dictionary Authorization=${auth}
- ${response}= Get On Session CPS_HOST ${uri} headers=${headers} expected_status=200
+ ${response}= Get On Session CPS_URL ${uri} headers=${headers} expected_status=200
${responseJson}= Set Variable ${response.json()}
Should Be Equal As Strings ${responseJson['name']} ${ranSchemaSetName}
Should Be Equal As Strings ${responseJson['dataspaceName']} ${ranDataspaceName}
diff --git a/csit/tests/cps-data/cps-data.robot b/csit/tests/cps-data/cps-data.robot
index 9fd8451d28..e7334ae11e 100644
--- a/csit/tests/cps-data/cps-data.robot
+++ b/csit/tests/cps-data/cps-data.robot
@@ -23,7 +23,7 @@ Library Collections
Library OperatingSystem
Library RequestsLibrary
-Suite Setup Create Session CPS_HOST ${CPS_HOST}
+Suite Setup Create Session CPS_URL http://${CPS_HOST}:${CPS_PORT}
*** Variables ***
@@ -37,14 +37,14 @@ Create Data Node
${uri}= Set Variable ${basePath}/v1/dataspaces/${dataspaceName}/anchors/${anchorName}/nodes
${headers} Create Dictionary Content-Type=application/json Authorization=${auth}
${jsonData}= Get Binary File ${DATADIR}${/}test-tree.json
- ${response}= POST On Session CPS_HOST ${uri} headers=${headers} data=${jsonData}
+ ${response}= POST On Session CPS_URL ${uri} headers=${headers} data=${jsonData}
Should Be Equal As Strings ${response.status_code} 201
Get Data Node by XPath
${uri}= Set Variable ${basePath}/v1/dataspaces/${dataspaceName}/anchors/${anchorName}/node
${params}= Create Dictionary xpath=/test-tree/branch[@name='Left']/nest
${headers}= Create Dictionary Authorization=${auth}
- ${response}= Get On Session CPS_HOST ${uri} params=${params} headers=${headers} expected_status=200
+ ${response}= Get On Session CPS_URL ${uri} params=${params} headers=${headers} expected_status=200
${responseJson}= Set Variable ${response.json()}
Should Be Equal As Strings ${responseJson['name']} Small