summaryrefslogtreecommitdiffstats
path: root/robot/resources/vvp_interface.robot
blob: 0bca8a5746c05418208c031ca60ef66eb614d22d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
*** Settings ***
Documentation     Tests the health of the VVP containers...
Library    Collections
Library         String
Library         RequestsLibrary
Resource        global_properties.robot

*** Variables ***
${VVP_PATH}    /
${VVP_CI_UWSGI_ENDPOINT}    ${GLOBAL_VVP_SERVER_PROTOCOL}://${GLOBAL_INJECTED_VVP_CI_UWSGI_IP_ADDR}:${GLOBAL_VVP_CI_UWSGI_PORT}
${VVP_CMS_UWSGI_ENDPOINT}    ${GLOBAL_VVP_SERVER_PROTOCOL}://${GLOBAL_INJECTED_VVP_CMS_UWSGI_IP_ADDR}:${GLOBAL_VVP_CMS_UWSGI_PORT1}
${VVP_EM_UWSGI_ENDPOINT}    ${GLOBAL_VVP_SERVER_PROTOCOL}://${GLOBAL_INJECTED_VVP_EM_UWSGI_IP_ADDR}:${GLOBAL_VVP_EM_UWSGI_PORT}
${VVP_EXT_HAPROXY_ENDPOINT}    ${GLOBAL_VVP_SERVER_PROTOCOL}://${GLOBAL_INJECTED_VVP_EXT_HAPROXY_IP_ADDR}:${GLOBAL_VVP_EXT_HAPROXY_PORT1}
${VVP_GITLAB_ENDPOINT}    ${GLOBAL_VVP_SERVER_PROTOCOL}://${GLOBAL_INJECTED_VVP_GITLAB_IP_ADDR}:${GLOBAL_VVP_GITLAB_PORT1}
${VVP_IMAGESCANNER_ENDPOINT}    ${GLOBAL_VVP_SERVER_PROTOCOL}://${GLOBAL_INJECTED_VVP_IMAGESCANNER_IP_ADDR}:${GLOBAL_VVP_IMAGESCANNER_PORT}
${VVP_INT_HAPROXY_ENDPOINT}    ${GLOBAL_VVP_SERVER_PROTOCOL}://${GLOBAL_INJECTED_VVP_INT_HAPROXY_IP_ADDR}:${GLOBAL_VVP_INT_HAPROXY_PORT1}
${VVP_JENKINS_ENDPOINT}    ${GLOBAL_VVP_SERVER_PROTOCOL}://${GLOBAL_INJECTED_VVP_JENKINS_IP_ADDR}:${GLOBAL_VVP_JENKINS_PORT}
${VVP_POSTGRES_ENDPOINT}    ${GLOBAL_VVP_SERVER_PROTOCOL}://${GLOBAL_INJECTED_VVP_POSTGRES_IP_ADDR}:${GLOBAL_VVP_POSTGRES_PORT}
${VVP_REDIS_ENDPOINT}    ${GLOBAL_VVP_SERVER_PROTOCOL}://${GLOBAL_INJECTED_VVP_REDIS_IP_ADDR}:${GLOBAL_VVP_REDIS_PORT}

*** Keywords ***
Run VVP ICE CI Container (Automat Testing) Health Check
    [Documentation]  Tests interface for container with purpose: end-to-end flow tests based on Seleniunm
    ${resp}=    Run ICE CI Container (Automat Testing) Get Request    ${VVP_PATH}
    Should Be Equal As Strings  ${resp.status_code}   200

Run ICE CI Container (Automat Testing) Get Request
    [Documentation]   Runs request in container with purpose: end-to-end flow tests based on Seleniunm
    [Arguments]    ${data_path}
    Log    Creating session ${VVP_CI_UWSGI_ENDPOINT}
    ${session}=    Create Session   ice-ci      ${VVP_CI_UWSGI_ENDPOINT}
    ${resp}=  Get Request   ice-ci     ${data_path}
    Log    Received response from ice-ci ${resp.text}
    [Return]    ${resp}

Run VVP CMS Health Check
    [Documentation]     Tests interface for container with purpose: backend uwsgi server which hosts django application
    ${resp}=     Run VVP CMS Get Request    ${VVP_PATH}
    Should Be Equal As Strings  ${resp.status_code}   200

Run VVP CMS Get Request
    [Documentation]   Runs request in container with purpose: backend uwsgi server which hosts django application
    [Arguments]    ${data_path}
    Log    Creating session ${VVP_CMS_UWSGI_ENDPOINT}
    ${session}=    Create Session   cms      ${VVP_CMS_UWSGI_ENDPOINT}
    ${resp}=  Get Request   cms     ${data_path}
    Log    Received response from cms ${resp.text}
    [Return]    ${resp}

Run VVP Engagement Manager Health Check
    [Documentation]  Tests interface for container with purpose: backend uwsgi server which hosts django application
    ${resp}=    Run VVP Engagement Manager Get Request    ${VVP_PATH}
    Should Be Equal As Strings  ${resp.status_code}   200

Run VVP Engagement Manager Get Request
    [Documentation]    Runs request in container with purpose: backend uwsgi server which hosts django application
    [Arguments]    ${data_path}
    Log    Creating session ${VVP_EM_UWSGI_ENDPOINT}
    ${session}=    Create Session   engagement-manager      ${VVP_EM_UWSGI_ENDPOINT}
    ${resp}=  Get Request   engagement-manager     ${data_path}
    Log    Received response from engagement-manager ${resp.text}
    [Return]    ${resp}

Run VVP Ext HA Proxy Health Check
    [Documentation]  Tests interface for container with purpose: load balancer for external transport
    ${resp}=    Run VVP Ext HA Proxy Get Request    ${VVP_PATH}
    Should Be Equal As Strings  ${resp.status_code}   200

Run VVP Ext HA Proxy Get Request
    [Documentation]   Runs request in container with purpose: load balancer for external transport
    [Arguments]    ${data_path}
    Log    Creating session ${VVP_EXT_HAPROXY_ENDPOINT}
    ${session}=    Create Session   ext-haproxy      ${VVP_EXT_HAPROXY_ENDPOINT}
    ${resp}=  Get Request   ext-haproxy     ${data_path}
    Log    Received response from ext-haproxy ${resp.text}
    [Return]    ${resp}

Run VVP Gitlab Health Check
    [Documentation]  Tests gitlab interface
    ${resp}=    Run VVP Gitlab Get Request    ${VVP_PATH}
    Should Be Equal As Strings  ${resp.status_code}   200

Run VVP Gitlab Get Request
    [Documentation]   Runs an gitlab request
    [Arguments]    ${data_path}
    Log    Creating session ${VVP_GITLAB_ENDPOINT}
    ${session}=    Create Session   gitlab      ${VVP_GITLAB_ENDPOINT}
    ${resp}=  Get Request   gitlab     ${data_path}
    Log    Received response from gitlab ${resp.text}
    [Return]    ${resp}

Run VVP Image Scanner Health Check
    [Documentation]  Tests interface for container with purpose: scan for validity and viruses on users files
    ${resp}=    Run VVP Image Scanner Get Request    ${VVP_PATH}
    Should Be Equal As Strings  ${resp.status_code}   200

Run VVP Image Scanner Get Request
    [Documentation]   Runs request in container with purpose: scan for validity and viruses on users files
    [Arguments]    ${data_path}
    Log    Creating session ${VVP_IMAGESCANNER_ENDPOINT}
    ${session}=    Create Session   image-scanner      ${VVP_IMAGESCANNER_ENDPOINT}
    ${resp}=  Get Request   image-scanner     ${data_path}
    Log    Received response from image-scanner ${resp.text}
    [Return]    ${resp}

Run VVP Int HA Proxy Health Check
    [Documentation]  Tests interface for container with purpose: load balancer for internal (container to container) transport
    ${resp}=    Run VVP Int HA Proxy Get Request    ${VVP_PATH}
    Should Be Equal As Strings  ${resp.status_code}   200

Run VVP Int HA Proxy Get Request
    [Documentation]   Runs request in container with purpose: load balancer for internal (container to container) transport
    [Arguments]    ${data_path}
    Log    Creating session ${VVP_INT_HAPROXY_ENDPOINT}
    ${session}=    Create Session   int-haproxy      ${VVP_INT_HAPROXY_ENDPOINT}
    ${resp}=  Get Request   int-haproxy     ${data_path}
    Log    Received response from int-haproxy ${resp.text}
    [Return]    ${resp}

Run VVP Jenkins Health Check
    [Documentation]  Tests jenkins interface
    ${resp}=    Run VVP Jenkins Get Request    ${VVP_PATH}
    Should Be Equal As Strings  ${resp.status_code}   200

Run VVP Jenkins Get Request
    [Documentation]   Runs a jenkins request
    [Arguments]    ${data_path}
    Log    Creating session ${VVP_JENKINS_ENDPOINT}
    ${session}=    Create Session   jenkins      ${VVP_JENKINS_ENDPOINT}
    ${resp}=  Get Request   jenkins     ${data_path}
    Log    Received response from jenkins ${resp.text}
    [Return]    ${resp}

Run VVP Postgresql Health Check
    [Documentation]  Tests postgresql interface
    ${resp}=    Run VVP Postgresql Get Request    ${VVP_PATH}
    Should Be Equal As Strings  ${resp.status_code}   200

Run VVP Postgresql Get Request
    [Documentation]   Runs a postgresql request
    [Arguments]    ${data_path}
    Log    Creating session ${VVP_POSTGRES_ENDPOINT}
    ${session}=    Create Session   postgresql      ${VVP_POSTGRES_ENDPOINT}
    ${resp}=  Get Request   postgresql     ${data_path}
    Log    Received response from postgresql ${resp.text}
    [Return]    ${resp}

Run VVP Redis Health Check
    [Documentation]  Tests redis interface
    ${resp}=    Run VVP Redis Get Request    ${VVP_PATH}
    Should Be Equal As Strings  ${resp.status_code}   200

Run VVP Redis Get Request
    [Documentation]   Runs a redis request
    [Arguments]    ${data_path}
    Log    Creating session ${VVP_REDIS_ENDPOINT}
    ${session}=    Create Session   redis      ${VVP_REDIS_ENDPOINT}
    ${resp}=  Get Request   redis     ${data_path}
    Log    Received response from redis ${resp.text}
    [Return]    ${resp}