BjornMagnussonXA | d3104ef | 2019-03-26 12:48:46 +0000 | [diff] [blame] | 1 | *** Settings *** |
TamasBakai | e81736c | 2019-08-23 13:31:57 +0000 | [diff] [blame] | 2 | Library OperatingSystem |
| 3 | Library RequestsLibrary |
| 4 | Library Process |
BjornMagnussonXA | d3104ef | 2019-03-26 12:48:46 +0000 | [diff] [blame] | 5 | |
TamasBakai | e81736c | 2019-08-23 13:31:57 +0000 | [diff] [blame] | 6 | Resource ../../resources/common-keywords.robot |
BjornMagnussonXA | d3104ef | 2019-03-26 12:48:46 +0000 | [diff] [blame] | 7 | |
| 8 | *** Variables *** |
TamasBakai | e81736c | 2019-08-23 13:31:57 +0000 | [diff] [blame] | 9 | ${CONSUL_UPL_APP} /usr/bin/curl -v http://127.0.0.1:8500/v1/kv/dfc_app0?dc=dc1 -X PUT -H 'Accept: application/json' -H 'Content-Type: application/json' -H 'X-Requested-With: XMLHttpRequest' --data-binary @${SIMGROUP_ROOT}/consul/c12_feed2_PM_MEAS.json |
| 10 | ${CONSUL_GET_APP} /usr/bin/curl -v http://127.0.0.1:8500/v1/kv/dfc_app0?raw |
| 11 | ${CBS_GET_MERGED_CONFIG} /usr/bin/curl -v http://127.0.0.1:10000/service_component_all/dfc_app0 |
BjornMagnussonXA | d3104ef | 2019-03-26 12:48:46 +0000 | [diff] [blame] | 12 | |
| 13 | *** Test Cases *** |
| 14 | |
| 15 | ######### Single file, SFTP |
| 16 | |
| 17 | Verify single event with single 1MB SFTP file. From event poll to published file |
TamasBakai | e81736c | 2019-08-23 13:31:57 +0000 | [diff] [blame] | 18 | [TAGS] DFC_FUNCTIONAL_1 |
| 19 | [Documentation] Verify single event with single SFTP 1MB file from event poll to published file. |
| 20 | ${cli_cmd_output}= Run Process ${DFC_ROOT}/../dfc-containers-clean.sh stderr=STDOUT |
| 21 | Log To Console Dfc containter clean: ${cli_cmd_output.stdout} ${cli_cmd_output.stderr} |
| 22 | Set Environment Variable MR_TC --tc100 |
| 23 | Set Environment Variable DR_TC --tc normal |
| 24 | Set Environment Variable DR_REDIR_TC --tc normal |
| 25 | Set Environment Variable MR_GROUPS OpenDcae-c12:PM_MEAS_FILES |
| 26 | Set Environment Variable MR_FILE_PREFIX_MAPPING PM_MEAS_FILES:A |
| 27 | Set Environment Variable DR_REDIR_FEEDS 2:A |
| 28 | Set Environment Variable FTP_FILE_PREFIXES A |
| 29 | Set Environment Variable NUM_FTPFILES 1 |
| 30 | Set Environment Variable NUM_PNFS 1 |
| 31 | Set Environment Variable FILE_SIZE 1MB |
| 32 | Set Environment Variable FTP_TYPE SFTP |
| 33 | Set Environment Variable NUM_FTP_SERVERS 1 |
| 34 | Set Environment Variable DR_FEEDS 2:A |
yanhuanwang | 31c7509 | 2019-09-11 15:15:21 +0200 | [diff] [blame] | 35 | Set Environment Variable DR_REDIR_SIM drsim_redir |
TamasBakai | e81736c | 2019-08-23 13:31:57 +0000 | [diff] [blame] | 36 | Set Environment Variable SFTP_SIMS sftp-server0:22 |
| 37 | Set Environment Variable FTPS_SIMS ftpes-server-vsftpd0:21 |
| 38 | |
| 39 | ${cli_cmd_output}= Run Process ./simulators-start.sh cwd=${SIMGROUP_ROOT} |
yanhuanwang | 31c7509 | 2019-09-11 15:15:21 +0200 | [diff] [blame] | 40 | Log To Console Simulator-start: |
TamasBakai | e81736c | 2019-08-23 13:31:57 +0000 | [diff] [blame] | 41 | Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr} |
| 42 | MR Sim Emitted Files Equal 0 #Verify 0 file emitted from MR sim |
| 43 | DR Sim Published Files Equal 0 #Verify 0 file published to DR sim |
| 44 | |
| 45 | ${cli_cmd_output}= Run Process ${CONSUL_UPL_APP} shell=yes |
| 46 | Log To Console Consul APP write: |
| 47 | Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr} |
| 48 | |
| 49 | ${cli_cmd_output}= Run Process ${CONSUL_GET_APP} shell=yes |
| 50 | Log To Console Consul APP read: |
| 51 | Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr} |
| 52 | |
| 53 | ${cli_cmd_output}= Run Process ${CBS_GET_MERGED_CONFIG} shell=yes |
| 54 | Log To Console CBS merged configuration: |
| 55 | Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr} |
| 56 | |
| 57 | Sleep 10 |
| 58 | |
| 59 | ${cli_cmd_output}= Run Process ${DFC_ROOT}/dfc-start.sh cwd=${DFC_ROOT} |
| 60 | Log To Console Dfc-start: |
| 61 | Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr} |
| 62 | |
| 63 | Wait Until Keyword Succeeds 1 minute 10 sec MR Sim Emitted Files Equal 1 #Verify 1 file emitted from MR sim |
| 64 | Wait Until Keyword Succeeds 1 minute 10 sec DR Sim Query Not Published Equal 1 #Verify 1 query response for not published files |
| 65 | Wait Until Keyword Succeeds 1 minute 10 sec DR Sim Published Files Equal 1 #Verify 1 file published to DR sim |
| 66 | DR Redir Sim Downloaded Volume Equal 1 000 000 #Verify 1 000 000 bytes published file data in DR redir sim |
| 67 | |
yanhuanwang | 46c195e | 2019-09-16 09:46:21 +0200 | [diff] [blame^] | 68 | ${cli_cmd_output}= Run Process ${SIMGROUP_ROOT}/simulators-kill.sh |
| 69 | Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr} |
| 70 | ${cli_cmd_output}= Run Process ${DFC_ROOT}/dfc-kill.sh |
| 71 | Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr} |
BjornMagnussonXA | d3104ef | 2019-03-26 12:48:46 +0000 | [diff] [blame] | 72 | |
| 73 | Verify single event with single 5MB SFTP file. From event poll to published file |
TamasBakai | e81736c | 2019-08-23 13:31:57 +0000 | [diff] [blame] | 74 | [TAGS] DFC_FUNCTIONAL_2 |
| 75 | [Documentation] Verify single event with single SFTP 5MB file from event poll to published file. |
| 76 | ${cli_cmd_output}= Run Process ${DFC_ROOT}/../dfc-containers-clean.sh stderr=STDOUT |
| 77 | Log To Console Dfc containter clean: ${cli_cmd_output.stdout} ${cli_cmd_output.stderr} |
| 78 | Set Environment Variable MR_TC --tc101 |
| 79 | Set Environment Variable DR_TC --tc normal |
| 80 | Set Environment Variable DR_REDIR_TC --tc normal |
| 81 | Set Environment Variable MR_GROUPS OpenDcae-c12:PM_MEAS_FILES |
| 82 | Set Environment Variable MR_FILE_PREFIX_MAPPING PM_MEAS_FILES:A |
| 83 | Set Environment Variable DR_REDIR_FEEDS 2:A |
| 84 | Set Environment Variable FTP_FILE_PREFIXES A |
| 85 | Set Environment Variable NUM_FTPFILES 1 |
| 86 | Set Environment Variable NUM_PNFS 1 |
| 87 | Set Environment Variable FILE_SIZE 5MB |
| 88 | Set Environment Variable FTP_TYPE SFTP |
| 89 | Set Environment Variable NUM_FTP_SERVERS 1 |
| 90 | Set Environment Variable DR_FEEDS 2:A |
yanhuanwang | 4805f96 | 2019-09-11 20:44:10 +0200 | [diff] [blame] | 91 | Set Environment Variable DR_REDIR_SIM drsim_redir |
TamasBakai | e81736c | 2019-08-23 13:31:57 +0000 | [diff] [blame] | 92 | Set Environment Variable SFTP_SIMS sftp-server0:22 |
| 93 | Set Environment Variable FTPS_SIMS ftpes-server-vsftpd0:21 |
| 94 | |
| 95 | ${cli_cmd_output}= Run Process ./simulators-start.sh cwd=${SIMGROUP_ROOT} |
| 96 | Log To Console Simulator-start: ${cli_cmd_output.stdout} |
| 97 | MR Sim Emitted Files Equal 0 #Verify 0 file emitted from MR sim |
| 98 | DR Sim Published Files Equal 0 #Verify 0 file published to DR sim |
| 99 | |
| 100 | ${cli_cmd_output}= Run Process ${CONSUL_UPL_APP} shell=yes |
| 101 | Log To Console Consul APP write: |
| 102 | Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr} |
| 103 | |
| 104 | ${cli_cmd_output}= Run Process ${CONSUL_GET_APP} shell=yes |
| 105 | Log To Console Consul APP read: |
| 106 | Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr} |
| 107 | |
| 108 | ${cli_cmd_output}= Run Process ${CBS_GET_MERGED_CONFIG} shell=yes |
| 109 | Log To Console CBS merged configuration: |
| 110 | Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr} |
| 111 | |
| 112 | Sleep 10 |
| 113 | |
| 114 | ${cli_cmd_output}= Run Process ${DFC_ROOT}/dfc-start.sh cwd=${DFC_ROOT} |
| 115 | Log To Console Dfc-start: |
| 116 | Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr} |
| 117 | |
| 118 | Wait Until Keyword Succeeds 1 minute 10 sec MR Sim Emitted Files Equal 1 #Verify 1 file emitted from MR sim |
| 119 | Wait Until Keyword Succeeds 1 minute 10 sec DR Sim Query Not Published Equal 1 #Verify 1 query response for not published files |
| 120 | Wait Until Keyword Succeeds 1 minute 10 sec DR Sim Published Files Equal 1 #Verify 1 file published to DR sim |
| 121 | DR Redir Sim Downloaded Volume Equal 5 000 000 #Verify 5 000 000 bytes published file data in DR redir sim |
| 122 | |
yanhuanwang | 46c195e | 2019-09-16 09:46:21 +0200 | [diff] [blame^] | 123 | ${cli_cmd_output}= Run Process ${SIMGROUP_ROOT}/simulators-kill.sh |
| 124 | Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr} |
| 125 | ${cli_cmd_output}= Run Process ${DFC_ROOT}/dfc-kill.sh |
| 126 | Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr} |
| 127 | |
| 128 | ${cli_cmd_output}= Run Process docker stop $(docker ps -aq) shell=yes |
| 129 | Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr} |
| 130 | |
| 131 | ${cli_cmd_output}= Run Process docker rm $(docker ps -aq) shell=yes |
| 132 | Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr} |
TamasBakai | e81736c | 2019-08-23 13:31:57 +0000 | [diff] [blame] | 133 | |
| 134 | Sleep 10 |
BjornMagnussonXA | d3104ef | 2019-03-26 12:48:46 +0000 | [diff] [blame] | 135 | |
| 136 | Verify single event with single 50MB SFTP file. From event poll to published file |
TamasBakai | e81736c | 2019-08-23 13:31:57 +0000 | [diff] [blame] | 137 | [TAGS] DFC_FUNCTIONAL_3 |
| 138 | [Documentation] Verify single event with single SFTP 50MB file from event poll to published file. |
| 139 | ${cli_cmd_output}= Run Process ${DFC_ROOT}/../dfc-containers-clean.sh |
| 140 | Set Environment Variable MR_TC --tc102 |
| 141 | Set Environment Variable DR_TC --tc normal |
| 142 | Set Environment Variable DR_REDIR_TC --tc normal |
| 143 | Set Environment Variable MR_GROUPS OpenDcae-c12:PM_MEAS_FILES |
| 144 | Set Environment Variable MR_FILE_PREFIX_MAPPING PM_MEAS_FILES:A |
| 145 | Set Environment Variable DR_REDIR_FEEDS 2:A |
| 146 | Set Environment Variable FTP_FILE_PREFIXES A |
| 147 | Set Environment Variable NUM_FTPFILES 1 |
| 148 | Set Environment Variable NUM_PNFS 1 |
| 149 | Set Environment Variable FILE_SIZE 50MB |
| 150 | Set Environment Variable FTP_TYPE SFTP |
| 151 | Set Environment Variable NUM_FTP_SERVERS 1 |
| 152 | Set Environment Variable DR_FEEDS 2:A |
yanhuanwang | 4805f96 | 2019-09-11 20:44:10 +0200 | [diff] [blame] | 153 | Set Environment Variable DR_REDIR_SIM drsim_redir |
TamasBakai | e81736c | 2019-08-23 13:31:57 +0000 | [diff] [blame] | 154 | Set Environment Variable SFTP_SIMS sftp-server0:22 |
| 155 | Set Environment Variable FTPS_SIMS ftpes-server-vsftpd0:21 |
BjornMagnussonXA | d3104ef | 2019-03-26 12:48:46 +0000 | [diff] [blame] | 156 | |
TamasBakai | e81736c | 2019-08-23 13:31:57 +0000 | [diff] [blame] | 157 | ${cli_cmd_output}= Run Process ./simulators-start.sh cwd=${SIMGROUP_ROOT} |
| 158 | Log To Console Simulator-start: ${cli_cmd_output.stdout} |
| 159 | MR Sim Emitted Files Equal 0 #Verify 0 file emitted from MR sim |
| 160 | DR Sim Published Files Equal 0 #Verify 0 file published to DR sim |
| 161 | |
| 162 | ${cli_cmd_output}= Run Process ${CONSUL_UPL_APP} shell=yes |
| 163 | Log To Console Consul APP write: |
| 164 | Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr} |
| 165 | |
| 166 | ${cli_cmd_output}= Run Process ${CONSUL_GET_APP} shell=yes |
| 167 | Log To Console Consul APP read: |
| 168 | Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr} |
| 169 | |
| 170 | ${cli_cmd_output}= Run Process ${CBS_GET_MERGED_CONFIG} shell=yes |
| 171 | Log To Console CBS merged configuration: |
| 172 | Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr} |
| 173 | |
| 174 | Sleep 10 |
| 175 | |
| 176 | ${cli_cmd_output}= Run Process ${DFC_ROOT}/dfc-start.sh cwd=${DFC_ROOT} |
| 177 | Log To Console Dfc-start: |
| 178 | Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr} |
| 179 | |
| 180 | Wait Until Keyword Succeeds 1 minute 10 sec MR Sim Emitted Files Equal 1 #Verify 1 file emitted from MR sim |
| 181 | Wait Until Keyword Succeeds 1 minute 10 sec DR Sim Query Not Published Equal 1 #Verify 1 query response for not published files |
| 182 | Wait Until Keyword Succeeds 1 minute 10 sec DR Sim Published Files Equal 1 #Verify 1 file published to DR sim |
| 183 | DR Redir Sim Downloaded Volume Equal 50 000 000 #Verify 50 000 000 bytes published file data in DR redir sim |
| 184 | |
yanhuanwang | 46c195e | 2019-09-16 09:46:21 +0200 | [diff] [blame^] | 185 | ${cli_cmd_output}= Run Process ${SIMGROUP_ROOT}/simulators-kill.sh |
| 186 | Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr} |
| 187 | ${cli_cmd_output}= Run Process ${DFC_ROOT}/dfc-kill.sh |
| 188 | Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr} |
BjornMagnussonXA | d3104ef | 2019-03-26 12:48:46 +0000 | [diff] [blame] | 189 | |
| 190 | ######### Single file, FTPS |
BjornMagnussonXA | 90b0974 | 2019-04-16 12:10:40 +0000 | [diff] [blame] | 191 | # Temporarily removed due to issues with the certificates for the ftsp server simulator cert. |
| 192 | #Verify single event with single 1MB FTPS file. From event poll to published file |
TamasBakai | e81736c | 2019-08-23 13:31:57 +0000 | [diff] [blame] | 193 | # [TAGS] DFC_FUNCTIONAL_10 |
| 194 | # [Documentation] Verify single event with single FTPS 1MB file from event poll to published file. |
| 195 | # ${cli_cmd_output}= Run Process ${DFC_ROOT}/../dfc-containers-clean.sh |
| 196 | # Set Environment Variable MR_TC --tc200 |
| 197 | # Set Environment Variable DR_TC --tc normal |
| 198 | # Set Environment Variable DR_REDIR_TC --tc normal |
| 199 | # Set Environment Variable NUM_FTPFILES 1 |
| 200 | # Set Environment Variable NUM_PNFS 1 |
| 201 | # Set Environment Variable FILE_SIZE 1MB |
| 202 | # Set Environment Variable FTP_TYPE FTPS |
| 203 | # ${cli_cmd_output}= Run Process ./simulators-start.sh cwd=${SIMGROUP_ROOT} |
| 204 | # MR Sim Emitted Files Equal 0 #Verify 0 file emitted from MR sim |
| 205 | # DR Sim Published Files Equal 0 #Verify 0 file published to DR sim |
| 206 | # ${cli_cmd_output}= Run Process ${DFC_ROOT}/dfc-start.sh cwd=${DFC_ROOT} |
| 207 | # Wait Until Keyword Succeeds 1 minute 10 sec MR Sim Emitted Files Equal 1 #Verify 1 file emitted from MR sim |
| 208 | # Wait Until Keyword Succeeds 1 minute 10 sec DR Sim Query Not Published Equal 1 #Verify 1 query response for not published files |
| 209 | # Wait Until Keyword Succeeds 1 minute 10 sec DR Sim Published Files Equal 1 #Verify 1 file published to DR sim |
| 210 | # DR Redir Sim Downloaded Volume Equal 1 000 000 #Verify 1 000 000 bytes published file data in DR redir sim |
| 211 | # ${cli_cmd_output}= Run Process ${SIMGROUP_ROOT}/simulators-kill.sh |
| 212 | # ${cli_cmd_output}= Run Process ${DFC_ROOT}/dfc-kill.sh |
BjornMagnussonXA | 90b0974 | 2019-04-16 12:10:40 +0000 | [diff] [blame] | 213 | # |
| 214 | #Verify single event with single 5MB FTPS file. From event poll to published file |
TamasBakai | e81736c | 2019-08-23 13:31:57 +0000 | [diff] [blame] | 215 | # [TAGS] DFC_FUNCTIONAL_11 |
| 216 | # [Documentation] Verify single event with single FTPS 5MB file from event poll to published file. |
| 217 | # ${cli_cmd_output}= Run Process ${DFC_ROOT}/../dfc-containers-clean.sh |
| 218 | # Set Environment Variable MR_TC --tc201 |
| 219 | # Set Environment Variable DR_TC --tc normal |
| 220 | # Set Environment Variable DR_REDIR_TC --tc normal |
| 221 | # Set Environment Variable NUM_FTPFILES 1 |
| 222 | # Set Environment Variable NUM_PNFS 1 |
| 223 | # Set Environment Variable FILE_SIZE 5MB |
| 224 | # Set Environment Variable FTP_TYPE FTPS |
| 225 | # ${cli_cmd_output}= Run Process ./simulators-start.sh cwd=${SIMGROUP_ROOT} |
| 226 | # MR Sim Emitted Files Equal 0 #Verify 0 file emitted from MR sim |
| 227 | # DR Sim Published Files Equal 0 #Verify 0 file published to DR sim |
| 228 | # ${cli_cmd_output}= Run Process ${DFC_ROOT}/dfc-start.sh cwd=${DFC_ROOT} |
| 229 | # Wait Until Keyword Succeeds 1 minute 10 sec MR Sim Emitted Files Equal 1 #Verify 1 file emitted from MR sim |
| 230 | # Wait Until Keyword Succeeds 1 minute 10 sec DR Sim Query Not Published Equal 1 #Verify 1 query response for not published files |
| 231 | # Wait Until Keyword Succeeds 1 minute 10 sec DR Sim Published Files Equal 1 #Verify 1 file published to DR sim |
| 232 | # DR Redir Sim Downloaded Volume Equal 5 000 000 #Verify 5 000 000 bytes published file data in DR redir sim |
| 233 | # ${cli_cmd_output}= Run Process ${SIMGROUP_ROOT}/simulators-kill.sh |
| 234 | # ${cli_cmd_output}= Run Process ${DFC_ROOT}/dfc-kill.sh |
BjornMagnussonXA | 90b0974 | 2019-04-16 12:10:40 +0000 | [diff] [blame] | 235 | # |
| 236 | #Verify single event with single 50MB FTPS file. From event poll to published file |
TamasBakai | e81736c | 2019-08-23 13:31:57 +0000 | [diff] [blame] | 237 | # [TAGS] DFC_FUNCTIONAL_12 |
| 238 | # [Documentation] Verify single event with single FTPS 50MB file from event poll to published file. |
| 239 | # ${cli_cmd_output}= Run Process ${DFC_ROOT}/../dfc-containers-clean.sh |
| 240 | # Set Environment Variable MR_TC --tc202 |
| 241 | # Set Environment Variable DR_TC --tc normal |
| 242 | # Set Environment Variable DR_REDIR_TC --tc normal |
| 243 | # Set Environment Variable NUM_FTPFILES 1 |
| 244 | # Set Environment Variable NUM_PNFS 1 |
| 245 | # Set Environment Variable FILE_SIZE 50MB |
| 246 | # Set Environment Variable FTP_TYPE FTPS |
| 247 | # ${cli_cmd_output}= Run Process ./simulators-start.sh cwd=${SIMGROUP_ROOT} |
| 248 | # MR Sim Emitted Files Equal 0 #Verify 0 file emitted from MR sim |
| 249 | # DR Sim Published Files Equal 0 #Verify 0 file published to DR sim |
| 250 | # ${cli_cmd_output}= Run Process ${DFC_ROOT}/dfc-start.sh cwd=${DFC_ROOT} |
| 251 | # Wait Until Keyword Succeeds 1 minute 10 sec MR Sim Emitted Files Equal 1 #Verify 1 file emitted from MR sim |
| 252 | # Wait Until Keyword Succeeds 1 minute 10 sec DR Sim Query Not Published Equal 1 #Verify 1 query response for not published files |
| 253 | # Wait Until Keyword Succeeds 1 minute 10 sec DR Sim Published Files Equal 1 #Verify 1 file published to DR sim |
| 254 | # DR Redir Sim Downloaded Volume Equal 50 000 000 #Verify 50 000 000 bytes published file data in DR redir sim |
| 255 | # ${cli_cmd_output}= Run Process ${SIMGROUP_ROOT}/simulators-kill.sh |
| 256 | # ${cli_cmd_output}= Run Process ${DFC_ROOT}/dfc-kill.sh |
BjornMagnussonXA | 90b0974 | 2019-04-16 12:10:40 +0000 | [diff] [blame] | 257 | # |
BjornMagnussonXA | d3104ef | 2019-03-26 12:48:46 +0000 | [diff] [blame] | 258 | |
| 259 | *** Keywords *** |
| 260 | |