Updates to DFC CSIT test
[integration/csit.git] / tests / dcaegen2-collectors-datafile / testsuites / ManagementInterface-suite / MI.robot
1 *** Settings ***
2 Library       OperatingSystem
3 Library       RequestsLibrary
4 Library       Process
5
6 *** Variables ***
7
8
9 *** Test Cases ***
10
11 Heartbeat test
12     [Documentation]    Check DFC heartbeat
13     Heartbeat              I'm living
14
15 Stop test
16     [Documentation]    Check DFC stop
17     Stop                           Datafile Service has already been stopped!
18
19 Start test
20     [Documentation]    Check DFC start
21     Start                  Datafile Service has been started!
22
23 Heartbeat test - secure
24     [Documentation]    Check DFC heartbeat, secure
25     Heartbeat-secure   I'm living
26
27 Stop test - secure
28     [Documentation]    Check DFC stop, secure
29     Stop-secure            Datafile Service has already been stopped!
30
31 Start test - secure
32     [Documentation]    Check DFC start, secure
33     Start-secure       Datafile Service has been started!
34
35
36 *** Keywords ***
37 #Probably simplyfy the test cases by using variables for port numbers/urls etc
38 Heartbeat
39     [Arguments]                  ${respbody}
40     Create Session               session              http://localhost:8100/heartbeat
41     ${resp}=                     Get Request          session                  /
42     Should Match Regexp                  ${resp.text}         ${respbody}*
43
44 Heartbeat-secure
45     [Arguments]                  ${respbody}
46     Create Session               session              https://localhost:8433/heartbeat
47     ${resp}=                     Get Request          session                  /
48     Should Match Regexp                  ${resp.text}         ${respbody}*
49
50 Stop
51     [Arguments]                  ${respbody}
52     Create Session               session              http://localhost:8100/stopDatafile
53     ${resp}=                     Get Request          session                  /
54     Should Be Equal                              ${resp.text}         ${respbody}
55
56 Stop-secure
57     [Arguments]                  ${respbody}
58     Create Session               session              https://localhost:8433/stopDatafile
59     ${resp}=                     Get Request          session                  /
60     Should Be Equal                              ${resp.text}         ${respbody}
61
62 Start
63     [Arguments]                  ${respbody}
64     Create Session               session              http://localhost:8100/start
65     ${resp}=                     Get Request          session                  /
66     Should Be Equal                              ${resp.text}         ${respbody}
67
68 Start-secure
69     [Arguments]                  ${respbody}
70     Create Session               session              https://localhost:8433/start
71     ${resp}=                     Get Request          session                  /
72     Should Be Equal                              ${resp.text}         ${respbody}