blob: be4e8cc6cb64ced65f7b49daa9c5e8b6cc2761fb [file] [log] [blame]
Gary Wu9abb61c2018-09-27 10:38:50 -07001*** Settings ***
2Library OperatingSystem
3Library RequestsLibrary
4
5*** Variables ***
6${MESSAGE} Hello, world!
7${DBC_URI} /webapi
8
9*** Test Cases ***
10String Equality Test
11 Should Be Equal ${MESSAGE} Hello, world!
12
13Dir Test
14 [Documentation] Check if /tmp exists
15 Log ${MESSAGE}
16 CheckDir /tmp
17
18Url Test
19 [Documentation] Check if www.onap.org can be reached
20 Create Session openo http://www.onap.org
21 CheckUrl openo / 200
22
23Mock Hello Server Test
24 [Documentation] Check /hello endpoint
25 Create Session hello http://${AAF_IP}:1080
26 CheckUrl hello /hello 200
27
28Heartbeat Test
29 [Documentation] Check ${DBC_URI}/info endpoint
30 Create Session heartbeat http://${DMAAPBC_IP}:8080
31 CheckUrl heartbeat ${DBC_URI}/info 204
32
33*** Keywords ***
34CheckDir
35 [Arguments] ${path}
36 Directory Should Exist ${path}
37
38CheckUrl
39 [Arguments] ${session} ${path} ${expect}
40 ${resp}= Get Request ${session} ${path}
41 Should Be Equal As Integers ${resp.status_code} ${expect}
42