potiuk commented on code in PR #54769: URL: https://github.com/apache/airflow/pull/54769#discussion_r2290933950
########## task-sdk/tests/task_sdk/definitions/test_secrets_masker.py: ########## @@ -564,6 +565,36 @@ def test_add_mask_short_secrets_and_skip_keywords( if should_be_masked: assert filt.replacer is not None + @pytest.mark.parametrize( + "object_to_mask", + [ + { + "key_path": "/files/airflow-breeze-config/keys2/keys.json", + "scope": "https://www.googleapis.com/auth/cloud-platform", + "project": "project_id", + "num_retries": 6, + }, + ["iter1", "iter2", {"key": "value"}], + "string", + { + "key1": "value1", + }, + ], + ) + def test_mask_secret_with_objects(self, object_to_mask): + mask_secret_object = MaskSecret(value=object_to_mask, name="test_secret") + assert mask_secret_object.value == object_to_mask + + def test_mask_secret_with_list(self): + example_dict = ["test"] + mask_secret_object = MaskSecret(value=example_dict, name="test_secret") + assert mask_secret_object.value == example_dict + + def test_mask_secret_with_iterable(self): + example_dict = ["test"] + mask_secret_object = MaskSecret(value=example_dict, name="test_secret") + assert mask_secret_object.value == example_dict + Review Comment: Feel free to add it separately :) ... I think the current one is "good enough" for this change - and I would not like to make it any bigger than it is, but You are absolutely free to add also the sending tests (this one was not about sending failing, it was about MaskSecret objects creation failing, so this is a bit different thing. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@airflow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org