Moving robot-systests deprecated to tests
[osm/tests.git] / robot-systest / deprecated / testsuite / cli / TS010__OSM_Platform_Resiliency_and_Recovery_Test.robot
1 # -*- coding: utf-8 -*-
2
3 ##
4 # Copyright 2019 Tech Mahindra Limited
5 #
6 # All Rights Reserved.
7 #
8 # Licensed under the Apache License, Version 2.0 (the "License"); you may
9 # not use this file except in compliance with the License. You may obtain
10 # a copy of the License at
11 #
12 #         http://www.apache.org/licenses/LICENSE-2.0
13 #
14 # Unless required by applicable law or agreed to in writing, software
15 # distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
16 # WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
17 # License for the specific language governing permissions and limitations
18 # under the License.
19 ##
20
21 ## Change log:
22 # 1. Jayant Madavi, Mrityunjay Yadav : MY00514913@techmahindra.com : 08-nov-2019 : network slicing test library
23 ##
24
25
26 *** Settings ***
27 Library     OperatingSystem
28 Library     String
29 Library     Collections
30 Resource    ../../lib/cli/osm_platform_resiliancy_recovery_lib.robot
31 Library     ../../lib/custom_lib.py
32
33
34 *** Variables ***
35 ${max_wait_time}    5min
36 ${pol_time}    30sec
37 @{components}    osm_keystone.1    osm_lcm.1    osm_light-ui.1    osm_mon.1    osm_mongo.1    osm_nbi.1    osm_pol.1    osm_prometheus.1    osm_ro.1    osm_kafka.1    osm_zookeeper.1    osm_mysql.1
38
39
40 *** Test Cases ***
41 Feature 1413 - OSM platform resiliency to single component failure
42     [Tags]  platform    resiliency
43     [Documentation]  OSM platform resiliency test
44
45     ${name}=    Get Random Item From List    ${components}
46     Check If OSM Working
47     WAIT UNTIL KEYWORD SUCCEEDS     2x   30sec   Check All Service Are Running
48     Kill Docker Container    ${name}
49     WAIT UNTIL KEYWORD SUCCEEDS     ${max_wait_time}   ${pol_time}   Check All Service Are Running
50     Check If OSM Working
51
52
53 Feature 1412 - OSM platform recovery after major failure
54     [Tags]  platform    recovery
55     [Documentation]  OSM platform recovery
56
57     Check If OSM Working
58     WAIT UNTIL KEYWORD SUCCEEDS     2x   30sec   Check All Service Are Running
59     :FOR    ${component}    IN    @{components}
60     \    Kill Docker Container    ${component}
61     WAIT UNTIL KEYWORD SUCCEEDS     ${max_wait_time}   ${pol_time}   Check All Service Are Running
62     Check If OSM Working