Tidy new and updated test suites.
[integration/test.git] / csit / suites / tsdr / Cassandra / 050_SyslogTable.robot
1 *** Settings ***
2 Documentation     Test suite for Cassandra DataStore Syslog Verification
3 Library           SSHLibrary
4 Library           Collections
5 Library           String
6 Library           ../../../libraries/Common.py
7 Resource          ../../../libraries/KarafKeywords.robot
8 Resource          ../../../libraries/TsdrUtils.robot
9 Variables         ../../../variables/Variables.py
10
11 *** Test Cases ***
12 Verification of TSDR Cassandra Feature Installation
13     [Documentation]    Install and Verify the TSDR Cassandra Syslog Features
14     Initialize Cassandra Tables Metricval    val_table=metriclog
15     Wait Until Keyword Succeeds    24x    10 sec    Check Karaf Log Has Messages    tsdr.syslog
16     Verify Feature Is Installed    odl-tsdr-cassandra
17     Verify Feature Is Installed    odl-tsdr-syslog-collector
18
19 Sending syslog to ODL Syslog collector using Logger command
20     [Documentation]    Sending Syslogs to collector.
21     : FOR    ${key}    IN ZIP    &{syslog_facility}
22     \    ${value}=    Get From Dictionary    ${syslog_facility}    ${key}
23     \    ${f_value}=    Evaluate    ${value} * 8
24     \    Generate Syslog    ${f_value}
25
26 Verifying TSDR Data Store For Syslog Entries
27     [Documentation]    Verifying if syslogs is getting stored.
28     Copy TSDR tables    val_table=metriclog
29     ${metric_log}=    Verify the Metrics Syslog on Cassandra Client    grep DC=SYSLOG
30     @{Syslogs}=    Split to lines    ${metric_log}
31     ${iterator}=    Set Variable    0
32     : FOR    ${key}    IN ZIP    &{syslog_facility}
33     \    ${value}=    Get From Dictionary    ${syslog_facility}    ${key}
34     \    ${f_value}=    Evaluate    ${value} * 8
35     \    Should Contain    @{syslogs}[${iterator}]    ${MESSAGE}
36     \    Should Contain    @{syslogs}[${iterator}]    <${f_value}>
37     \    ${iterator}=    Evaluate    ${iterator} + 1