Merge "Organize file structure for tests"
[validation.git] / tests / k8s / ha / ha_worker.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 *** Settings ***
19 Documentation     Run HA Test - Fail Control Plane 3
20 Library           SSHLibrary
21 Library           OperatingSystem
22 Suite Setup       Open Connection And Log In
23 Suite Teardown    Close All Connections
24
25 *** Variables ***
26 ${HOST}           localhost
27 ${USERNAME}       ipmi_admin_username
28 ${PASSWORD}       ipmi_admin_password
29 ${LOG}            /opt/akraino/validation/ha/print_ha.txt
30
31 *** Test Cases ***
32 Power Status of Host
33         [Documentation]         Get Power Status on iDRAC
34         ${output}=              Execute Command         racadm serveraction powerstatus
35         Append To File          ${LOG}  ${output}${\n}
36         Should Contain          ${output}               ON
37
38
39 Fail Control Plane
40         [Documentation]         Perform a reboot operation via iDRAC
41         ${output}               Execute Command         racadm serveraction hardreset
42         Append To File          ${LOG}  ${output}${\n}
43         Should Contain          ${output}               successful
44
45
46 *** Keywords ***
47 Open Connection And Log In
48   Open Connection       ${HOST}
49   Login                 ${USERNAME}     ${PASSWORD}
50