Basic Tests for DAEXIM project
[integration/test.git] / csit / suites / daexim / 010-special-export.robot
1 *** Settings ***
2 Documentation     Test suite for backing up data and models
3 Suite Setup       ClusterManagement Setup
4 Suite Teardown    Delete All Sessions
5 Library           OperatingSystem
6 Library           DateTime
7 Resource          ../../libraries/DaeximKeywords.robot
8
9 *** Test Cases ***
10 Create and Cancel Backup
11     [Documentation]    schedule and cancel backup of a cluster
12     [Tags]    cancel backup
13     DaeximKeywords.Verify Backup Status    initial    1
14     DaeximKeywords.Schedule Backup    1
15     DaeximKeywords.Verify Backup Status    scheduled    1
16     DaeximKeywords.Cancel Backup    1
17     DaeximKeywords.Verify Backup Status    initial    1
18
19 Schedule Absolute Time Backup With UTC
20     [Documentation]    Schedule backup at a particular time
21     [Tags]    absolute time backup
22     ${time}    DateTime.Get Current Date    UTC    00:00:10    %Y-%m-%dT%H:%M:%SZ    ${FALSE}
23     DaeximKeywords.Schedule Backup    1    ${time}
24     BuiltIn.Wait Until Keyword Succeeds    20 sec    5 sec    DaeximKeywords.Verify Scheduled Backup Timestamp    1    ${time}
25     Builtin.Wait Until Keyword Succeeds    20 sec    5 sec    DaeximKeywords.Verify Backup Status    complete    1
26     DaeximKeywords.Verify Backup Files    1
27
28 Schedule Absolute Time Backup With Localtime
29     [Documentation]    Schedule backup at a particular time
30     [Tags]    absolute time backup
31     ${time}    DateTime.Get Current Date    local    00:00:10    %Y-%m-%dT%H:%M:%S+000    ${FALSE}
32     Builtin.Run Keyword And Expect Error    *    Schedule Backup    1    ${time}
33
34 Schedule Absolute Time Backup In Past
35     [Documentation]    Schedule backup at a particular time
36     [Tags]    absolute time backup
37     ${time}    DateTime.Get Current Date    UTC    -00:00:10    %Y-%m-%dT%H:%M:%SZ    ${FALSE}
38     Builtin.Run Keyword And Expect Error    *    Schedule Backup    1    ${time}
39
40 Create Module Exclude Backup
41     [Documentation]    schedule backup with exclude option on a cluster
42     [Tags]    exclude backup
43     ${file1}    DaeximKeywords.Schedule Exclude Backup    1    config    network-topology
44     ${lines1}    OperatingSystem.Grep File    ${file1}    network-topology:
45     Builtin.Should Be Empty    ${lines1}
46     ${file2}    DaeximKeywords.Schedule Exclude Backup    1    operational    opendaylight-inventory
47     ${lines2}    OperatingSystem.Grep File    ${file2}    opendaylight-inventory:
48     Builtin.Should Be Empty    ${lines2}
49
50 Create Wildcard Exclude Backup
51     [Documentation]    schedule backup with wildstar exclude option
52     [Tags]    wildcard exclude backup
53     ${file1}    DaeximKeywords.Schedule Exclude Backup    1    config    *
54     ${lines1}    Operating System.Get File    ${file1}
55     Builtin.Should Be Equal    ${lines1}    {}
56     ${file2}    Schedule Exclude Backup    1    operational    *
57     ${lines2}    Operating System.Get File    ${file2}
58     Builtin.Should Be Equal    ${lines2}    {}