Organize file structure for tests
[validation.git] / tests / openstack / ceph_service / ceph_service.robot
1 ##############################################################################
2 # Copyright (c) 2019 AT&T Intellectual Property.                             #
3 # Copyright (c) 2019 Nokia.                                                  #
4 #                                                                            #
5 # Licensed under the Apache License, Version 2.0 (the "License");            #
6 # you maynot use this file except in compliance with the License.            #
7 #                                                                            #
8 # You may obtain a copy of the License at                                    #
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, WITHOUT  #
13 # 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
18
19 *** Settings ***
20 Documentation     Tests to verify the availability and recovery of failed
21 ...               Ceph services
22 Resource          ceph_service.resource
23 Suite Setup       Open Connection And Log In
24 Suite Teardown    Close All Connections
25
26
27 *** Test Cases ***
28 Failure Of Single Monitor And Manager
29     @{nodes}  Create list  ${NODENAME}-1
30     Kill Ceph Monitor  @{nodes}
31     Kill Ceph Manager  @{nodes}
32     Sleep  5s
33     Ceph Health Should Be Degraded
34     Start Ceph Monitor  @{nodes}
35     Start Ceph Manager  @{nodes}
36     Sleep  10s
37     Ceph Should Be Healthy
38
39 Failure Of Two Monitors And Managers
40     @{nodes}  Create list  ${NODENAME}-1  ${NODENAME}-2
41     Kill Ceph Monitor  @{nodes}
42     Kill Ceph Manager  @{nodes}
43     Sleep  5s
44     Start Ceph Monitor  @{nodes}
45     Start Ceph Manager  @{nodes}
46     Sleep  10s
47     Ceph Should Be Healthy
48
49 Failure Of Single Object Storage Daemon
50     @{nodes}  Create list  ${NODENAME}-1
51     ${num_up_osds}   Number Of OSDs Up
52     Kill Ceph OSD  @{nodes}
53     Sleep  5s
54     Number Of OSDs Up Should Be  ${num_up_osds-1}
55     Ceph Health Should Be Degraded
56     Start Ceph OSD  @{nodes}
57     Sleep  10s
58     Number Of OSDs Up Should Be  ${num_up_osds}
59     Ceph Should Be Healthy
60
61 Failure Of Two Object Storage Daemons
62     @{nodes}  Create list  ${NODENAME}-1  ${NODENAME}-2
63     ${num_up_osds}   Number Of OSDs Up
64     Kill Ceph OSD  @{nodes}
65     Sleep  5s
66     Number Of OSDs Up Should Be  ${num_up_osds-2}
67     Ceph Health Should Be Degraded
68     Start Ceph OSD  @{nodes}
69     Sleep  10s
70     Number Of OSDs Up Should Be  ${num_up_osds}
71     Ceph Should Be Healthy