Step 1: Move vm scripts to the right place
[integration/test.git] / csit / suites / tsdr / H2 / 020_FlowMetrics.robot
1 *** Settings ***
2 Documentation     Test suite for H2 DataStore Flow Metrics Verification
3 Suite Setup       Start Tsdr Suite
4 Suite Teardown    Stop Tsdr Suite
5 Library           SSHLibrary
6 Library           Collections
7 Library           String
8 Library           ../../../libraries/Common.py
9 Resource          ../../../libraries/KarafKeywords.robot
10 Resource          ../../../libraries/TsdrUtils.robot
11 Variables         ../../../variables/Variables.py
12
13 *** Variables ***
14 @{FLOW_METRICS}    PacketCount    ByteCount
15 ${TSDR_FLOWSTATS}    tsdr:list FlowStats
16
17 *** Test Cases ***
18 Verification of TSDR FlowMetrics
19     [Documentation]    Verify the TSDR FlowStats
20     Wait Until Keyword Succeeds    60s    1s    Verify the Metric is Collected?    ${TSDR_FLOWSTATS}    PacketCount
21     ${output}=    Issue Command On Karaf Console    ${TSDR_FLOWSTATS}    ${CONTROLLER}    ${KARAF_SHELL_PORT}    30
22     : FOR    ${list}    IN    @{FLOW_METRICS}
23     \    Should Contain    ${output}    ${list}
24
25 Verify FlowStats-Attributes on H2 Datastore using JDBC Client
26     [Documentation]    Verify the PortStats,attributes on H2 Datastore using JDBC Client
27     : FOR    ${list}    IN    @{FLOW_METRICS}
28     \    ${output}=    Query Metrics on H2 Datastore    FLOWSTATS    ${list}
29     \    Should Contain    ${output}    ${list}