blob: 9957c5bcb725e363f71bcc3c0088dc7981129dfc [file] [log] [blame]
ss412g42996b72019-09-10 14:30:26 +03001##############################################################################
2#
3# Copyright (c) 2019 AT&T Intellectual Property.
4#
5# Licensed under the Apache License, Version 2.0 (the "License");
6# you may not use this file except in compliance with the License.
7# You may obtain a copy of the License at
8#
9# http://www.apache.org/licenses/LICENSE-2.0
10#
11# Unless required by applicable law or agreed to in writing, software
12# distributed under the License is distributed on an "AS IS" BASIS,
13# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14# See the License for the specific language governing permissions and
15# limitations under the License.
16#
17##############################################################################
nm755n15d39822019-11-28 16:56:00 +000018#
19# This source code is part of the near-RT RIC (RAN Intelligent Controller)
20# platform project (RICP).
21#
ss412g42996b72019-09-10 14:30:26 +030022*** Settings ***
ss412gef8e7b22020-07-14 21:54:24 +000023Variables ../Scripts/variables.py
24Suite Setup Prepare Enviorment ${True}
ss412g42996b72019-09-10 14:30:26 +030025Resource ../Resource/resource.robot
26Resource ../Resource/Keywords.robot
Irina065c2622020-06-30 14:47:37 +030027Library ../Scripts/find_error_script.py
ss412g011bb912020-03-17 18:34:42 +020028Library ../Scripts/e2mdbscripts.py
ss412g35766cc2020-07-21 13:46:58 +000029Library ../Scripts/log_scripts.py
ss412g42996b72019-09-10 14:30:26 +030030Library OperatingSystem
31Library Collections
32Library REST ${url}
33
ss412gef8e7b22020-07-14 21:54:24 +000034*** Variables ***
35${url} ${e2mgr_address}
ss412g42996b72019-09-10 14:30:26 +030036
ss412g42996b72019-09-10 14:30:26 +030037*** Test Cases ***
38
ss412g35766cc2020-07-21 13:46:58 +000039Prepare Redis Monitor Log
40 Start Redis Monitor
41
ss412g011bb912020-03-17 18:34:42 +020042Setup Ran and verify it's CONNECTED and associated
Amichaidbc719c2020-07-29 09:38:24 +000043 Get Request nodeb
ss412g011bb912020-03-17 18:34:42 +020044 Integer response status 200
ec472j09950082020-04-08 16:44:48 +030045 String response body ranName ${ranname}
ss412g011bb912020-03-17 18:34:42 +020046 String response body connectionStatus CONNECTED
ss412gef8e7b22020-07-14 21:54:24 +000047 String response body associatedE2tInstanceAddress ${e2t_alpha_address}
ss412g011bb912020-03-17 18:34:42 +020048
ec472j09950082020-04-08 16:44:48 +030049Stop simulator
50 Stop Simulator
ss412g011bb912020-03-17 18:34:42 +020051
52Verify connection status is DISCONNECTED and RAN is not associated with E2T instance
ss412gef8e7b22020-07-14 21:54:24 +000053 Sleep 30s
Amichaidbc719c2020-07-29 09:38:24 +000054 GET ${getNodeb}/${ranName}
ss412g42996b72019-09-10 14:30:26 +030055 Integer response status 200
ec472j09950082020-04-08 16:44:48 +030056 String response body ranName ${ranname}
ss412g011bb912020-03-17 18:34:42 +020057 Missing response body associatedE2tInstanceAddress
ss412g42996b72019-09-10 14:30:26 +030058 String response body connectionStatus DISCONNECTED
ss412g42996b72019-09-10 14:30:26 +030059
Irina065c2622020-06-30 14:47:37 +030060prepare logs for tests
61 Remove log files
62 Save logs
63
ss412g011bb912020-03-17 18:34:42 +020064Verify E2T instance is NOT associated with RAN
ss412gef8e7b22020-07-14 21:54:24 +000065 ${result} e2mdbscripts.verify_ran_is_associated_with_e2t_instance ${ranname} ${e2t_alpha_address}
ss412g011bb912020-03-17 18:34:42 +020066 Should Be True ${result} == False
Irina065c2622020-06-30 14:47:37 +030067
ss412g35766cc2020-07-21 13:46:58 +000068Redis Monitor Logs - Verify Publish
69 Redis Monitor Logs - Verify Publish To Connection Status Channel ${ran_name} DISCONNECTED
ss412gef8e7b22020-07-14 21:54:24 +000070
71[Teardown] Run Keywords
72 Start Simulator
ss412g45758a82020-07-27 08:09:49 +000073 AND wait until keyword succeeds 2 min 10 sec Validate Required Dockers
ss412g35766cc2020-07-21 13:46:58 +000074 AND Stop Redis Monitor