Added Syslog Scripts to run in Cassandra,HBase and HSQLDB
[integration/test.git] / csit / suites / tsdr / HBase / 050_SyslogTable.robot
diff --git a/csit/suites/tsdr/HBase/050_SyslogTable.robot b/csit/suites/tsdr/HBase/050_SyslogTable.robot
new file mode 100644 (file)
index 0000000..dd0d8d9
--- /dev/null
@@ -0,0 +1,33 @@
+*** Settings ***
+Documentation     Test suite for HBase Syslog Verification
+Library           SSHLibrary
+Library           Collections
+Library           String
+Library           ../../../libraries/Common.py
+Resource          ../../../libraries/KarafKeywords.robot
+Resource          ../../../libraries/TsdrUtils.robot
+Variables         ../../../variables/Variables.py
+
+*** Test Cases ***
+
+Verification of TSDR HBase Feature Installation
+    [Documentation]    Install and Verify the TSDR Cassandra Syslog Features
+    Wait Until Keyword Succeeds    24x    10 sec    Check Karaf Log Has Messages    tsdr.syslog
+    Verify Feature Is Installed    odl-tsdr-hbase
+    Verify Feature Is Installed    odl-tsdr-syslog-collector
+
+Sending syslog to ODL Syslog collector using Logger command
+    [Documentation]    Verifying if syslogs is collected and getting stored.
+    Query the Data from HBaseClient    truncate 'SYSLOG'
+    :FOR    ${key}    IN ZIP   &{syslog_facility}
+    \    ${value}=    Get From Dictionary    ${syslog_facility}    ${key}
+    \    ${f_value}=    Evaluate    ${value} * 8
+    \    Generate Syslog    ${f_value}
+
+    ${output}=    Query the Data from HBaseClient    scan 'SYSLOG'
+    Should Contain X Times    ${output}    ${MESSAGE_PATTERN}    1
+    :FOR    ${key}    IN ZIP   &{syslog_facility}
+    \    ${value}=    Get From Dictionary    ${syslog_facility}    ${key}
+    \    ${f_value}=    Evaluate    ${value} * 8
+    \    Should Match    ${output}    *${f_value}>*
+