Clean data when switching tell-base protocol.
[integration/test.git] / csit / suites / test / cluster_reset.robot
1 *** Settings ***
2 Documentation     Kill nodes, delete all data created since boot, start nodes, wait for sync.
3 ...
4 ...               Copyright (c) 2016 Cisco Systems, Inc. and others. All rights reserved.
5 ...
6 ...               This program and the accompanying materials are made available under the
7 ...               terms of the Eclipse Public License v1.0 which accompanies this distribution,
8 ...               and is available at http://www.eclipse.org/legal/epl-v10.html
9 ...
10 ...
11 ...               This suite is useful for undoing feature installation, Leader movement
12 ...               and for recovering from bably broken state.
13 ...               The intent is to provide speed compared to isolated job runs.
14 ...
15 ...               FIXME: Import improvements from suites manipulating tell-based protocol setting.
16 Suite Setup       ClusterManagement.ClusterManagement_Setup
17 Default Tags      clustering    critical
18 Library           DateTime
19 Library           SSHLibrary
20 Resource          ${CURDIR}/../../libraries/ClusterManagement.robot
21
22 *** Test Cases ***
23 Kill_All_And_Get_Logs
24     [Documentation]    Kill every node, download karaf logs.
25     ClusterManagement.Kill_Members_From_List_Or_All
26     ClusterManagement.Safe_With_Ssh_To_List_Or_All_Run_Keyword    member_index_list=${EMPTY}    keyword_name=Download_Karaf_Log
27
28 Clean_Start_All_And_Sync
29     [Documentation]    Remove various data folders, including ${KARAF_HOME}/data/ on every node.
30     ...    Start each memberand wait for sync.
31     ClusterManagement.Clean_Directories_On_List_Or_All
32     ClusterManagement.Start_Members_From_List_Or_All
33     BuiltIn.Comment    Basic synch performed, but waits for specific functionality may still be needed.
34
35 *** Keywords ***
36 Download_Karaf_Log
37     ${timestamp} =    DateTime.Get_Current_Date    time_zone=UTC    result_format=%Y%m%d%H%M%S%f
38     SSHLibrary.Get_File    ${WORKSPACE}${/}${BUNDLEFOLDER}${/}data${/}log${/}karaf.log    karaf_${timestamp}.log