ss412g | 42996b7 | 2019-09-10 14:30:26 +0300 | [diff] [blame] | 1 | ############################################################################## |
| 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 | ############################################################################## |
nm755n | 15d3982 | 2019-11-28 16:56:00 +0000 | [diff] [blame] | 18 | # |
| 19 | # This source code is part of the near-RT RIC (RAN Intelligent Controller) |
| 20 | # platform project (RICP). |
| 21 | # |
ss412g | 42996b7 | 2019-09-10 14:30:26 +0300 | [diff] [blame] | 22 | *** Settings *** |
ss412g | ef8e7b2 | 2020-07-14 21:54:24 +0000 | [diff] [blame] | 23 | Variables ../Scripts/variables.py |
| 24 | Suite Setup Prepare Enviorment ${True} |
ss412g | 42996b7 | 2019-09-10 14:30:26 +0300 | [diff] [blame] | 25 | Resource ../Resource/resource.robot |
| 26 | Resource ../Resource/Keywords.robot |
Irina | 065c262 | 2020-06-30 14:47:37 +0300 | [diff] [blame] | 27 | Library ../Scripts/find_error_script.py |
ss412g | 011bb91 | 2020-03-17 18:34:42 +0200 | [diff] [blame] | 28 | Library ../Scripts/e2mdbscripts.py |
ss412g | 35766cc | 2020-07-21 13:46:58 +0000 | [diff] [blame^] | 29 | Library ../Scripts/log_scripts.py |
ss412g | 42996b7 | 2019-09-10 14:30:26 +0300 | [diff] [blame] | 30 | Library OperatingSystem |
| 31 | Library Collections |
| 32 | Library REST ${url} |
| 33 | |
ss412g | ef8e7b2 | 2020-07-14 21:54:24 +0000 | [diff] [blame] | 34 | *** Variables *** |
| 35 | ${url} ${e2mgr_address} |
ss412g | 42996b7 | 2019-09-10 14:30:26 +0300 | [diff] [blame] | 36 | |
ss412g | 42996b7 | 2019-09-10 14:30:26 +0300 | [diff] [blame] | 37 | *** Test Cases *** |
| 38 | |
ss412g | 35766cc | 2020-07-21 13:46:58 +0000 | [diff] [blame^] | 39 | Prepare Redis Monitor Log |
| 40 | Start Redis Monitor |
| 41 | |
ss412g | 011bb91 | 2020-03-17 18:34:42 +0200 | [diff] [blame] | 42 | Setup Ran and verify it's CONNECTED and associated |
ec472j | 0995008 | 2020-04-08 16:44:48 +0300 | [diff] [blame] | 43 | Get Request node b gnb |
ss412g | 011bb91 | 2020-03-17 18:34:42 +0200 | [diff] [blame] | 44 | Integer response status 200 |
ec472j | 0995008 | 2020-04-08 16:44:48 +0300 | [diff] [blame] | 45 | String response body ranName ${ranname} |
ss412g | 011bb91 | 2020-03-17 18:34:42 +0200 | [diff] [blame] | 46 | String response body connectionStatus CONNECTED |
ss412g | ef8e7b2 | 2020-07-14 21:54:24 +0000 | [diff] [blame] | 47 | String response body associatedE2tInstanceAddress ${e2t_alpha_address} |
ss412g | 011bb91 | 2020-03-17 18:34:42 +0200 | [diff] [blame] | 48 | |
ec472j | 0995008 | 2020-04-08 16:44:48 +0300 | [diff] [blame] | 49 | Stop simulator |
| 50 | Stop Simulator |
ss412g | 011bb91 | 2020-03-17 18:34:42 +0200 | [diff] [blame] | 51 | |
| 52 | Verify connection status is DISCONNECTED and RAN is not associated with E2T instance |
ss412g | ef8e7b2 | 2020-07-14 21:54:24 +0000 | [diff] [blame] | 53 | Sleep 30s |
ec472j | 0995008 | 2020-04-08 16:44:48 +0300 | [diff] [blame] | 54 | GET ${getNodeb} |
ss412g | 42996b7 | 2019-09-10 14:30:26 +0300 | [diff] [blame] | 55 | Integer response status 200 |
ec472j | 0995008 | 2020-04-08 16:44:48 +0300 | [diff] [blame] | 56 | String response body ranName ${ranname} |
ss412g | 011bb91 | 2020-03-17 18:34:42 +0200 | [diff] [blame] | 57 | Missing response body associatedE2tInstanceAddress |
ss412g | 42996b7 | 2019-09-10 14:30:26 +0300 | [diff] [blame] | 58 | String response body connectionStatus DISCONNECTED |
ss412g | 42996b7 | 2019-09-10 14:30:26 +0300 | [diff] [blame] | 59 | |
Irina | 065c262 | 2020-06-30 14:47:37 +0300 | [diff] [blame] | 60 | prepare logs for tests |
| 61 | Remove log files |
| 62 | Save logs |
| 63 | |
ss412g | 011bb91 | 2020-03-17 18:34:42 +0200 | [diff] [blame] | 64 | Verify E2T instance is NOT associated with RAN |
ss412g | ef8e7b2 | 2020-07-14 21:54:24 +0000 | [diff] [blame] | 65 | ${result} e2mdbscripts.verify_ran_is_associated_with_e2t_instance ${ranname} ${e2t_alpha_address} |
ss412g | 011bb91 | 2020-03-17 18:34:42 +0200 | [diff] [blame] | 66 | Should Be True ${result} == False |
Irina | 065c262 | 2020-06-30 14:47:37 +0300 | [diff] [blame] | 67 | |
ss412g | 35766cc | 2020-07-21 13:46:58 +0000 | [diff] [blame^] | 68 | Redis Monitor Logs - Verify Publish |
| 69 | Redis Monitor Logs - Verify Publish To Connection Status Channel ${ran_name} DISCONNECTED |
ss412g | ef8e7b2 | 2020-07-14 21:54:24 +0000 | [diff] [blame] | 70 | |
| 71 | [Teardown] Run Keywords |
| 72 | Start Simulator |
ss412g | 35766cc | 2020-07-21 13:46:58 +0000 | [diff] [blame^] | 73 | AND wait until keyword succeeds 1 min 10 sec Validate Required Dockers |
| 74 | AND Stop Redis Monitor |