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 |
Remigiusz Janeczek | c45b798 | 2020-07-24 14:18:42 +0200 | [diff] [blame] | 21 | Verify Single Event From Event Poll To Published File 1 --tc100 SFTP |
| 22 | |
| 23 | |
| 24 | Verify single event with single 5MB SFTP file. From event poll to published file |
| 25 | [TAGS] DFC_FUNCTIONAL_2 |
| 26 | [Documentation] Verify single event with single SFTP 5MB file from event poll to published file. |
| 27 | Verify Single Event From Event Poll To Published File 5 --tc101 SFTP |
| 28 | |
| 29 | |
| 30 | Verify single event with single 50MB SFTP file. From event poll to published file |
| 31 | [TAGS] DFC_FUNCTIONAL_3 |
| 32 | [Documentation] Verify single event with single SFTP 50MB file from event poll to published file. |
| 33 | Verify Single Event From Event Poll To Published File 50 --tc102 SFTP |
| 34 | |
| 35 | |
| 36 | ######## Single file, FTPS |
| 37 | Verify single event with single 1MB FTPS file. From event poll to published file |
| 38 | [TAGS] DFC_FUNCTIONAL_10 |
| 39 | [Documentation] Verify single event with single FTPS 1MB file from event poll to published file. |
| 40 | Verify Single Event From Event Poll To Published File 1 --tc200 FTPS |
| 41 | |
| 42 | Verify single event with single 1MB FTPS file. From event poll to published file |
| 43 | [TAGS] DFC_FUNCTIONAL_11 |
| 44 | [Documentation] Verify single event with single FTPS 5MB file from event poll to published file. |
| 45 | Verify Single Event From Event Poll To Published File 5 --tc201 FTPS |
| 46 | |
| 47 | Verify single event with single 1MB FTPS file. From event poll to published file |
| 48 | [TAGS] DFC_FUNCTIONAL_12 |
| 49 | [Documentation] Verify single event with single FTPS 50MB file from event poll to published file. |
| 50 | Verify Single Event From Event Poll To Published File 50 --tc202 FTPS |
| 51 | |
| 52 | *** Keywords *** |
| 53 | Verify Single Event From Event Poll To Published File |
| 54 | [Documentation] Keyword to verify single event with file with given parameters. |
| 55 | [Arguments] ${file_size_in_mb} ${mr_tc} ${ftp_type} |
Remigiusz Janeczek | c45b798 | 2020-07-24 14:18:42 +0200 | [diff] [blame] | 56 | Set Environment Variable MR_TC ${mr_tc} |
| 57 | Set Environment Variable FILE_SIZE ${file_size_in_mb}MB |
| 58 | Set Environment Variable FTP_TYPE ${ftp_type} |
| 59 | Set Default Environment Variables |
TamasBakai | e81736c | 2019-08-23 13:31:57 +0000 | [diff] [blame] | 60 | |
| 61 | ${cli_cmd_output}= Run Process ./simulators-start.sh cwd=${SIMGROUP_ROOT} |
yanhuanwang | 31c7509 | 2019-09-11 15:15:21 +0200 | [diff] [blame] | 62 | Log To Console Simulator-start: |
TamasBakai | e81736c | 2019-08-23 13:31:57 +0000 | [diff] [blame] | 63 | Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr} |
| 64 | MR Sim Emitted Files Equal 0 #Verify 0 file emitted from MR sim |
| 65 | DR Sim Published Files Equal 0 #Verify 0 file published to DR sim |
| 66 | |
| 67 | ${cli_cmd_output}= Run Process ${CONSUL_UPL_APP} shell=yes |
| 68 | Log To Console Consul APP write: |
| 69 | Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr} |
| 70 | |
| 71 | ${cli_cmd_output}= Run Process ${CONSUL_GET_APP} shell=yes |
| 72 | Log To Console Consul APP read: |
| 73 | Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr} |
| 74 | |
| 75 | ${cli_cmd_output}= Run Process ${CBS_GET_MERGED_CONFIG} shell=yes |
| 76 | Log To Console CBS merged configuration: |
| 77 | Log To Console ${cli_cmd_output.stdout} ${cli_cmd_output.stderr} |
| 78 | |
| 79 | Sleep 10 |
| 80 | |
Remigiusz Janeczek | c45b798 | 2020-07-24 14:18:42 +0200 | [diff] [blame] | 81 | Start DFC |
TamasBakai | e81736c | 2019-08-23 13:31:57 +0000 | [diff] [blame] | 82 | |
| 83 | Wait Until Keyword Succeeds 1 minute 10 sec MR Sim Emitted Files Equal 1 #Verify 1 file emitted from MR sim |
| 84 | Wait Until Keyword Succeeds 1 minute 10 sec DR Sim Query Not Published Equal 1 #Verify 1 query response for not published files |
| 85 | Wait Until Keyword Succeeds 1 minute 10 sec DR Sim Published Files Equal 1 #Verify 1 file published to DR sim |
Remigiusz Janeczek | c45b798 | 2020-07-24 14:18:42 +0200 | [diff] [blame] | 86 | DR Redir Sim Downloaded Volume Equal ${file_size_in_mb} 000 000 #Verify correct number of bytes published file data in DR redir sim |
Remigiusz Janeczek | 9055367 | 2020-07-14 10:08:01 +0200 | [diff] [blame^] | 87 | |
| 88 | [Teardown] Test Teardown |
BjornMagnussonXA | d3104ef | 2019-03-26 12:48:46 +0000 | [diff] [blame] | 89 | |
Remigiusz Janeczek | c45b798 | 2020-07-24 14:18:42 +0200 | [diff] [blame] | 90 | Set Default Environment Variables |
| 91 | [Documentation] Set default environment variables for simulators setup |
TamasBakai | e81736c | 2019-08-23 13:31:57 +0000 | [diff] [blame] | 92 | Set Environment Variable DR_TC --tc normal |
| 93 | Set Environment Variable DR_REDIR_TC --tc normal |
| 94 | Set Environment Variable MR_GROUPS OpenDcae-c12:PM_MEAS_FILES |
| 95 | Set Environment Variable MR_FILE_PREFIX_MAPPING PM_MEAS_FILES:A |
| 96 | Set Environment Variable DR_REDIR_FEEDS 2:A |
| 97 | Set Environment Variable FTP_FILE_PREFIXES A |
| 98 | Set Environment Variable NUM_FTPFILES 1 |
| 99 | Set Environment Variable NUM_PNFS 1 |
TamasBakai | e81736c | 2019-08-23 13:31:57 +0000 | [diff] [blame] | 100 | Set Environment Variable NUM_FTP_SERVERS 1 |
| 101 | Set Environment Variable DR_FEEDS 2:A |
yanhuanwang | 4805f96 | 2019-09-11 20:44:10 +0200 | [diff] [blame] | 102 | Set Environment Variable DR_REDIR_SIM drsim_redir |
TamasBakai | e81736c | 2019-08-23 13:31:57 +0000 | [diff] [blame] | 103 | Set Environment Variable SFTP_SIMS sftp-server0:22 |
| 104 | Set Environment Variable FTPS_SIMS ftpes-server-vsftpd0:21 |