edge_orchestrator CI on branch >> 60/merge << #360
GitHub Actions / Unit tests report in Python 3.9
failed
Dec 26, 2024 in 0s
65 passed, 2 failed and 0 skipped
❌ edge_orchestrator/reports/pytest/unit-tests-report.xml
67 tests were completed in 3s with 65 passed, 2 failed and 0 skipped.
Test suite | Passed | Failed | Skipped | Time |
---|---|---|---|---|
pytest | 65✅ | 2❌ | 3s |
❌ pytest
tests.unit_tests.domain.test_supervisor.TestSupervisor
✅ test_2_models_in_parallel
✅ test_2_models_in_serie
✅ test_get_prediction_for_camera_should_return_2_predicted_objects_by_one_object_detection_model[camera_id1]
✅ test_get_prediction_for_camera_should_return_2_predicted_objects_by_one_object_detection_model[camera_id2]
✅ test_get_prediction_for_camera_should_return_2_predicted_objects_by_one_object_detection_model[camera_id3]
✅ test_get_prediction_for_camera_should_return_2_predicted_objects_by_one_object_detection_model[camera_id4]
✅ test_get_prediction_for_camera_should_return_1_predicted_object_by_one_classification_model[camera_id1]
✅ test_get_prediction_for_camera_should_return_1_predicted_object_by_one_classification_model[camera_id2]
✅ test_get_prediction_for_camera_should_return_1_predicted_object_by_one_classification_model[camera_id3]
✅ test_get_prediction_for_camera_should_return_1_predicted_object_by_one_classification_model[camera_id4]
✅ test_get_prediction_for_camera_returns_2_objects_with_label_for_object_detection_followed_by_classif[camera_id1]
✅ test_get_prediction_for_camera_returns_2_objects_with_label_for_object_detection_followed_by_classif[camera_id2]
✅ test_get_prediction_for_camera_returns_2_objects_with_label_for_object_detection_followed_by_classif[camera_id3]
✅ test_get_prediction_for_camera_returns_2_objects_with_label_for_object_detection_followed_by_classif[camera_id4]
✅ test_get_prediction_for_camera_returns_2_objects_with_label_for_object_detection_with_classif_model[camera_id1]
✅ test_get_prediction_for_camera_returns_2_objects_with_label_for_object_detection_with_classif_model[camera_id2]
✅ test_get_prediction_for_camera_returns_2_objects_with_label_for_object_detection_with_classif_model[camera_id3]
✅ test_get_prediction_for_camera_returns_2_objects_with_label_for_object_detection_with_classif_model[camera_id4]
✅ test_get_prediction_for_camera_should_return_1_output_by_model_and_among_them_1_is_classification[camera_id1]
✅ test_get_prediction_for_camera_should_return_1_output_by_model_and_among_them_1_is_classification[camera_id2]
✅ test_get_prediction_for_camera_should_return_1_output_by_model_and_among_them_1_is_classification[camera_id3]
✅ test_get_prediction_for_camera_should_return_1_output_by_model_and_among_them_1_is_classification[camera_id4]
✅ test_get_prediction_for_camera_should_return_1_output_by_model_and_among_them_2_are_classification[camera_id1]
✅ test_get_prediction_for_camera_should_return_1_output_by_model_and_among_them_2_are_classification[camera_id2]
✅ test_get_prediction_for_camera_should_return_1_output_by_model_and_among_them_2_are_classification[camera_id3]
✅ test_get_prediction_for_camera_should_return_1_output_by_model_and_among_them_2_are_classification[camera_id4]
✅ test_apply_crop_function_with_correct_box_should_resize_the_picture
✅ test_apply_crop_function_with_incorrect_box_should_log_an_error_and_return_the_same_picture
✅ test_set_decision_should_send_final_decision_to_telemetry_sink
✅ test_inspect_should_log_information_about_item_processing
tests.unit_tests.domain.models.test_edge_station.TestEdgeStation
✅ test_register_cameras_raises_exception_when_no_active_configuration_is_set
✅ test_capture_should_raise_exception_when_cameras_are_not_registered
✅ test_capture_should_instantiate_item_with_1_binary
tests.unit_tests.domain.models.test_item.TestItem
✅ test_item_from_nothing_should_instantiate_empty_item_with_serial_number_and_category_hardcoded
tests.unit_tests.domain.models.business_rule.test_camera_business_rules.TestCameraBusinessRule
✅ test_camera_decision_should_return_KO_when_expected_label_is_OK
✅ test_camera_decision_should_return_OK_when_minimum_one_person_is_detected
✅ test_camera_decision_should_return_OK_when_minimum_one_face_is_detected_with_two_object_detection_models
✅ test_camera_decision_should_return_OK_when_minimum_one_connected_cellphone_is_detected_with_one_object_detection_and_one_classification_model
✅ test_camera_decision_should_return_no_decision_without_inference_results
tests.unit_tests.domain.models.business_rule.test_item_business_rules.TestItemBusinessRule
✅ test_item_decision_should_return_decision_ko_when_one_or_more_than_one_camera_decision_is_ko
✅ test_item_decision_should_return_decision_ok_when_more_than_50_pct_of_camera_decisions_are_ok
✅ test_item_decision_should_return_no_decision_ko_with_no_camera_decision
tests.unit_tests.infrastructure.binary_storage.test_filesystem_binary_storage.TestFileSystemBinaryStorage
✅ test_save_item_binaries_should_write_image_on_filesystem
✅ test_get_item_binary_should_return_requested_item_binary
✅ test_get_item_binaries_should_return_all_item_binaries_names
tests.unit_tests.infrastructure.binary_storage.test_gcp_binary_storage.TestGCPBinaryStorage
❌ test_save_item_binaries_should_write_image_in_gcp
self = <test_gcp_binary_storage.TestGCPBinaryStorage object at 0x7ffba7f11700>
❌ test_get_item_binary_should_return_image
self = <test_gcp_binary_storage.TestGCPBinaryStorage object at 0x7ffba7f11730>
tests.unit_tests.infrastructure.binary_storage.test_memory_binary_storage.TestMemoryBinaryStorage
✅ test_save_item_binaries_should_write_image_in_memory
✅ test_get_item_binary_should_return_requested_item_binary
✅ test_get_item_binaries_should_return_all_item_binaries_names
tests.unit_tests.infrastructure.camera.test_fake_camera.TestFakeCamera
✅ test_select_random_image_should_return_random_image_from_input_images_folder
tests.unit_tests.infrastructure.metadata_storage.test_filesystem_metadata_storage.TestFileSystemMetadataStorage
✅ test_save_item_metadata_should_write_metadata_on_filesystem
✅ test_get_item_metadata_should_return_requested_item_metadata
✅ test_get_item_state_should_return_expected_state
✅ test_get_all_items_metadata_should_return_expected_metadata_list
tests.unit_tests.infrastructure.metadata_storage.test_memory_item_storage.TestMemoryItemStorage
✅ test_save_item_metadata_should_write_item_in_memory
✅ test_get_item_metadata_should_return_requested_item_metadata
✅ test_get_all_items_metadata_should_return_all_items
tests.unit_tests.infrastructure.model_forward.test_fake_model_forwarder.TestFakeModelForwarder
✅ test_perform_inference_should_return_classification_results
✅ test_perform_inference_should_return_object_detection_results
✅ test_perform_inference_should_return_object_detection_with_classification_results
tests.unit_tests.infrastructure.model_forward.test_tf_serving_classification_wrapper.TestClassifModelHelper
✅ test_perform_pre_processing_should_return_an_image_as_an_array_with_the_expected_format
✅ test_perform_post_processing_should_transform_the_standard_output_from_the_model_into_the_expected_format
tests.unit_tests.infrastructure.model_forward.test_tf_serving_detection_and_classification_wrapper.TestDetectionClassificationHelper
✅ test_perform_pre_processing_should_return_an_image_as_an_array_with_the_expected_format
✅ test_perform_post_processing_should_transform_the_standard_output_from_the_model_into_the_expected_format
tests.unit_tests.infrastructure.model_forward.test_tf_serving_detection_wrapper.TestDetectionWrapperHelper
✅ test_perform_pre_processing_should_return_an_image_as_an_array_with_the_expected_format
✅ test_perform_post_processing_should_transform_the_standard_output_from_the_model_into_the_expected_format
Annotations
Check failure on line 0 in edge_orchestrator/reports/pytest/unit-tests-report.xml
github-actions / Unit tests report in Python 3.9
pytest ► tests.unit_tests.infrastructure.binary_storage.test_gcp_binary_storage.TestGCPBinaryStorage ► test_save_item_binaries_should_write_image_in_gcp
Failed test found in:
edge_orchestrator/reports/pytest/unit-tests-report.xml
Error:
self = <test_gcp_binary_storage.TestGCPBinaryStorage object at 0x7ffba7f11700>
Raw output
self = <test_gcp_binary_storage.TestGCPBinaryStorage object at 0x7ffba7f11700>
mock_storage = <MagicMock name='storage' id='140718811467632'>
@patch("edge_orchestrator.infrastructure.binary_storage.gcp_binary_storage.storage")
def test_save_item_binaries_should_write_image_in_gcp(self, mock_storage):
# Given
edge_name = "edge_test"
os.environ["EDGE_NAME"] = edge_name
test_active_config_name = "test_config"
test_camera_id = "1"
test_file_path = TEST_DATA_FOLDER_PATH / edge_name / test_active_config_name / "item_2" / "camera_id1.jpg"
item = Item.from_nothing()
with open(test_file_path, "rb") as f:
item.binaries = {test_camera_id: f}
mock_gcs_client = mock_storage.Client.return_value
mock_bucket = Mock()
mock_gcs_client.get_bucket.return_value = mock_bucket
> gcs = GCPBinaryStorage()
E TypeError: __init__() missing 1 required positional argument: 'prefix'
tests/unit_tests/infrastructure/binary_storage/test_gcp_binary_storage.py:26: TypeError
Check failure on line 0 in edge_orchestrator/reports/pytest/unit-tests-report.xml
github-actions / Unit tests report in Python 3.9
pytest ► tests.unit_tests.infrastructure.binary_storage.test_gcp_binary_storage.TestGCPBinaryStorage ► test_get_item_binary_should_return_image
Failed test found in:
edge_orchestrator/reports/pytest/unit-tests-report.xml
Error:
self = <test_gcp_binary_storage.TestGCPBinaryStorage object at 0x7ffba7f11730>
Raw output
self = <test_gcp_binary_storage.TestGCPBinaryStorage object at 0x7ffba7f11730>
mock_storage = <MagicMock name='storage' id='140718811886640'>
@patch("edge_orchestrator.infrastructure.binary_storage.gcp_binary_storage.storage")
def test_get_item_binary_should_return_image(self, mock_storage):
# Given
test_active_config_name = "test_config"
test_camera_id = "1"
test_file_path = TEST_DATA_FOLDER_PATH / EDGE_NAME / test_active_config_name / "item_2" / "camera_id1.jpg"
item = Item.from_nothing()
with open(test_file_path, "rb") as f:
item.binaries = {test_camera_id: f}
mock_gcs_client = mock_storage.Client.return_value
mock_bucket = Mock()
mock_gcs_client.get_bucket.return_value = mock_bucket
> gcs = GCPBinaryStorage()
E TypeError: __init__() missing 1 required positional argument: 'prefix'
tests/unit_tests/infrastructure/binary_storage/test_gcp_binary_storage.py:50: TypeError
Loading