From 6b19e980fd5a17aa64ca521b590d9e4301562374 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B1=9F=E5=AE=B6=E7=91=8B?= <36886416+JiangJiaWei1103@users.noreply.github.com> Date: Tue, 7 Jan 2025 00:03:34 +0800 Subject: [PATCH] [test] Add integration test for accessing sd sttr in dc (#2969) * test: Add integration test for attr access of sd Signed-off-by: JiaWei Jiang * Correct file path Signed-off-by: JiaWei Jiang * test: Support interaction with minio s3 bucket 1. Upload a local parquet file to minio s3 bucket 2. Access StructuredDataset attr from a dataclass 3. Open StructuredDataset from a remote path Signed-off-by: JiaWei Jiang * Delete an unmerged integration test Signed-off-by: JiaWei Jiang * Try imagespec with commit sha of corresponding fix Signed-off-by: JiaWei Jiang * Remove redundant test Signed-off-by: JiaWei Jiang * Remove default_factory and create sd dc from input uri Signed-off-by: JiaWei Jiang * refactor: Clean test logic 1. Remove redundant prints 2. Use `mock.patch.dict` to setup `os.environ` for the current test fn * Avoid contaminating other tests running in the same process Signed-off-by: JiaWei Jiang * Remove redundant minio env var setup and add test comments Signed-off-by: JiaWei Jiang * Support uploading tmp pqt file Signed-off-by: JiaWei Jiang * Udpate deprecated module Signed-off-by: JiaWei Jiang * Remove redundant and unused imports Signed-off-by: JiaWei Jiang --------- Signed-off-by: JiaWei Jiang Signed-off-by: Shuying Liang --- tests/flytekit/integration/remote/test_remote.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/flytekit/integration/remote/test_remote.py b/tests/flytekit/integration/remote/test_remote.py index be17e26174..de1a1c8821 100644 --- a/tests/flytekit/integration/remote/test_remote.py +++ b/tests/flytekit/integration/remote/test_remote.py @@ -14,7 +14,7 @@ from urllib.parse import urlparse import uuid import pytest -import mock +from unittest import mock from flytekit import LaunchPlan, kwtypes, WorkflowExecutionPhase from flytekit.configuration import Config, ImageConfig, SerializationSettings