def test_decode_report_metadata(self, yupana_config, mult_pod_logs, isolated_filesystem): """Verifies the application successfully decoded the metadata from the report uploaded. :id: aa4ed3fc-ad89-11e9-b303-8c1645a90ee2 :description: Test that the application successfully decodes the report metadata after an upload. :expectedresults: Several strings should be detected in one of the pod logs which signify that the metatdata was attempted and successfully decoded. """ pod_logs = mult_pod_logs attempt_log_matches = search_mult_pod_logs( pod_logs, "EXTRACT REPORT\ FROM TAR - Attempting to\ decode the file\ metadata.json", ) assert (attempt_log_matches is not []), "Log indicating report metatdata\ decode attempt not found in pod logs." success_log_matches = search_mult_pod_logs( pod_logs, "EXTRACT REPORT\ FROM TAR - Successfully\ decoded the file\ metadata.json", ) assert (success_log_matches is not []), "Log indicationg report metadata\
def test_report_saving_message(self, yupana_config, mult_pod_logs, isolated_filesystem): """Verifies the application saved the upload service message. :id: 8e8e57a8-ad86-11e9-a486-8c1645a90ee2 :description: Test that the 'Report SAVING MESSAGE' string detected in application after sending an upload. :expectedresults: The string 'Report SAVING MESSAGE' should be detected in one of the pod logs, after sending a new report. """ pod_logs = mult_pod_logs log_matches = search_mult_pod_logs(pod_logs, "NEW REPORT UPLOAD") assert log_matches is not []
def test_new_report_upload(self, yupana_config, mult_pod_logs, isolated_filesystem): """Verifies the application detected a new report upload. :id: 2bd03a02-9f56-11e9-b9ee-8c1645a90ee2 :description: Test that the 'NEW REPORT UPLOAD' message detected in application after sending an upload. :expectedresults: The string 'NEW REPORT UPLOAD' should be detected in one of the pod logs, after sending a new report. """ pod_logs = mult_pod_logs log_matches = search_mult_pod_logs(pod_logs, "NEW REPORT UPLOAD") assert log_matches is not []
def test_report_download_success(self, yupana_config, mult_pod_logs, isolated_filesystem): """Verifies the application successfully download the report after upload :id: 2b130e0a-ad89-11e9-97da-8c1645a90ee2 :description: Test that the application successfully downloads the report after an upload. :expectedresults: The string 'REPORT DOWNLOAD - successfully downloaded TAR' should be detected in one of the pod logs, after sending a new report. """ pod_logs = mult_pod_logs log_matches = search_mult_pod_logs( pod_logs, "REPORT DOWNLOAD - successfully downloaded TAR") assert log_matches is not []
def test_start_report_processor(self, yupana_config, mult_pod_logs, isolated_filesystem): """Verifies the application starts the report processor after upload :id: 3129d14a-ad87-11e9-97a2-8c1645a90ee2 :description: Test that the 'Starting report processor. State is \"new\"' string detected in application after sending an upload. :expectedresults: The string 'Starting report processor. State is \"new\".' should be detected in one of the pod logs, after sending a new report. """ pod_logs = mult_pod_logs log_matches = search_mult_pod_logs( pod_logs, 'Starting report processor. State is "new".') assert log_matches is not []
def test_report_download(self, yupana_config, mult_pod_logs, isolated_filesystem): """Verifies the application starts to download the report after upload :id: e12eedc8-ad87-11e9-8c82-8c1645a90ee2 :description: Test that the application starts to download the report recieving an upload. :expectedresults: The string 'REPORT DOWNLOAD - downloading' should be detected in one of the pod logs, after sending a new report. """ pod_logs = mult_pod_logs log_matches = search_mult_pod_logs( pod_logs, "REPORT DOWNLOAD -\ downloading", ) assert log_matches is not []
def test_report_metadata(self, yupana_config, mult_pod_logs, isolated_filesystem): """Verifies the correct metadata was successfully extracted and uploaded :id: 9d58265a-ad8c-11e9-8099-8c1645a90ee2 :description: Test that the expected metadata was uploaded. :expectedresults: The expected metadata contents should be found in the at least one of the pod logs.""" pod_logs = mult_pod_logs log_matches = search_mult_pod_logs( pod_logs, "The following source\ metadata was uploaded:\ {'any_satellite_info_you_want':\ 'some stuff that will not be\ validated but will be logged'}", ) assert log_matches is not []