From a22d4b93d6a7a68417d4a1ef3aee6a01bade16de Mon Sep 17 00:00:00 2001 From: garciadeblas Date: Tue, 23 Jan 2024 14:29:51 +0100 Subject: [PATCH] Read all variables required for EPA_03 testsuite from the robot file Change-Id: Ibcd39e2e1547839ca276718c8d4f25e67cb8071d Signed-off-by: garciadeblas --- .../epa_03-crud_operations_on_sdnc_data.py | 29 ------------------- .../epa_03-crud_operations_on_sdnc.robot | 17 +++++++---- 2 files changed, 12 insertions(+), 34 deletions(-) delete mode 100644 robot-systest/resources/epa_03-crud_operations_on_sdnc_data.py diff --git a/robot-systest/resources/epa_03-crud_operations_on_sdnc_data.py b/robot-systest/resources/epa_03-crud_operations_on_sdnc_data.py deleted file mode 100644 index fe8d541..0000000 --- a/robot-systest/resources/epa_03-crud_operations_on_sdnc_data.py +++ /dev/null @@ -1,29 +0,0 @@ -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import os - - -# SDNC Configuration -sdnc_name = "epa_03" -sdnc_user = os.environ.get("SDNC_USER") -if not sdnc_user: - raise Exception("'SDNC_USER' environment variable not found") -sdnc_password = os.environ.get("SDNC_PASSWORD") -if not sdnc_password: - raise Exception("'SDNC_PASSWORD' environment variable not found") -sdnc_url = os.environ.get("SDNC_URL") -if not sdnc_url: - raise Exception("'SDNC_URL' environment variable not found") -sdnc_type = os.environ.get("SDNC_TYPE") -if not sdnc_type: - raise Exception("'SDNC_TYPE' environment variable not found") diff --git a/robot-systest/testsuite/epa_03-crud_operations_on_sdnc.robot b/robot-systest/testsuite/epa_03-crud_operations_on_sdnc.robot index 1312328..116082b 100644 --- a/robot-systest/testsuite/epa_03-crud_operations_on_sdnc.robot +++ b/robot-systest/testsuite/epa_03-crud_operations_on_sdnc.robot @@ -18,23 +18,26 @@ Documentation [EPA-03] CRUD operations on SDNC accounts. Resource ../lib/prometheus_lib.resource Resource ../lib/sdnc_lib.resource -Variables ../resources/epa_03-crud_operations_on_sdnc_data.py - Test Tags epa_03 cluster_epa daily regression Suite Setup Run Keyword And Ignore Error Suite Preparation -Suite Teardown Run Keyword And Ignore Error Delete Basic SDNC +Suite Teardown Run Keyword And Ignore Error Clean SDNC *** Variables *** ${SDNC_ENABLED_MAX_WAIT_TIME} 1min ${SDNC_ENABLED_POL_TIME} 10 +${SDNC_NAME} epa_03 +${SDNC_USER} %{SDNC_USER=karaf} +${SDNC_PASSWORD} %{SDNC_PASSWORD=karaf} +${SDNC_URL} %{SDNC_URL=http://localhost:8181} +${SDNC_TYPE} %{SDNC_TYPE=onos_vpls} *** Test Cases *** Create Basic SDNC [Documentation] Register SDN controller in OSM. - ${created_sdnc_id}= Create SDNC ${sdnc_name} ${sdnc_user} ${sdnc_password} ${sdnc_url} ${sdnc_type} + ${created_sdnc_id}= Create SDNC ${SDNC_NAME} ${SDNC_USER} ${SDNC_PASSWORD} ${SDNC_URL} ${SDNC_TYPE} Set Suite Variable ${SDNC_ID} ${created_sdnc_id} Wait Until Keyword Succeeds ${SDNC_ENABLED_MAX_WAIT_TIME} ${SDNC_ENABLED_POL_TIME} Check For SDNC ${SDNC_ID} @@ -45,10 +48,14 @@ Check SDNC Status Is Healthy Delete Basic SDNC [Documentation] Delete SDN controller from OSM. [Tags] cleanup - Delete SDNC ${sdnc_name} + Delete SDNC ${SDNC_NAME} *** Keywords *** Suite Preparation [Documentation] Test Suite Preparation: Setting Prometheus Testsuite Variables. Set Testsuite Prometheus Variables + +Clean SDNC + [Documentation] Delete SDN controller from OSM. + Delete SDNC ${sdnc_name} -- 2.25.1