From efbdf21098a01a16d448c17b8ce23a2b5f68f20b Mon Sep 17 00:00:00 2001 From: IceS2 Date: Thu, 19 Dec 2024 10:39:30 +0100 Subject: [PATCH] Fix e2e tests (#19130) * Fix E2E * Fix E2E * Fix MySQL count * Tentative Fix * Tentative Fix * Revert PowerBI changes * Revert PowerBI changes --- ingestion/tests/cli_e2e/base/config_builders/builders.py | 1 - ingestion/tests/cli_e2e/database/mysql/mysql.yaml | 2 -- ingestion/tests/cli_e2e/test_cli_mysql.py | 4 ++-- ingestion/tests/cli_e2e/test_cli_oracle.py | 9 +++++++++ 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/ingestion/tests/cli_e2e/base/config_builders/builders.py b/ingestion/tests/cli_e2e/base/config_builders/builders.py index 44bc3c7aa23..f9b1a9d0ccc 100644 --- a/ingestion/tests/cli_e2e/base/config_builders/builders.py +++ b/ingestion/tests/cli_e2e/base/config_builders/builders.py @@ -89,7 +89,6 @@ class AutoClassificationConfigBuilder(BaseBuilder): "type": "AutoClassification", "storeSampleData": True, "enableAutoClassification": False, - "profileSample": self.profilerSample, } } diff --git a/ingestion/tests/cli_e2e/database/mysql/mysql.yaml b/ingestion/tests/cli_e2e/database/mysql/mysql.yaml index d0e67e623a5..bfd4e43e68a 100644 --- a/ingestion/tests/cli_e2e/database/mysql/mysql.yaml +++ b/ingestion/tests/cli_e2e/database/mysql/mysql.yaml @@ -28,5 +28,3 @@ workflowConfig: authProvider: openmetadata securityConfig: jwtToken: "eyJraWQiOiJHYjM4OWEtOWY3Ni1nZGpzLWE5MmotMDI0MmJrOTQzNTYiLCJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJhZG1pbiIsImlzQm90IjpmYWxzZSwiaXNzIjoib3Blbi1tZXRhZGF0YS5vcmciLCJpYXQiOjE2NjM5Mzg0NjIsImVtYWlsIjoiYWRtaW5Ab3Blbm1ldGFkYXRhLm9yZyJ9.tS8um_5DKu7HgzGBzS1VTA5uUjKWOCU0B_j08WXBiEC0mr0zNREkqVfwFDD-d24HlNEbrqioLsBuFRiwIWKc1m_ZlVQbG7P36RUxhuv2vbSp80FKyNM-Tj93FDzq91jsyNmsQhyNv_fNr3TXfzzSPjHt8Go0FMMP66weoKMgW2PbXlhVKwEuXUHyakLLzewm9UMeQaEiRzhiTMU3UkLXcKbYEJJvfNFcLwSl9W8JCO_l0Yj3ud-qt_nQYEZwqW6u5nfdQllN133iikV4fM5QZsMCnm8Rq1mvLR0y9bmJiD7fwM1tmJ791TUWqmKaTnP49U493VanKpUAfzIiOiIbhg" - - diff --git a/ingestion/tests/cli_e2e/test_cli_mysql.py b/ingestion/tests/cli_e2e/test_cli_mysql.py index e6a67568e5d..bc1325f8701 100644 --- a/ingestion/tests/cli_e2e/test_cli_mysql.py +++ b/ingestion/tests/cli_e2e/test_cli_mysql.py @@ -117,7 +117,7 @@ class MysqlCliTest(CliCommonDB.TestSuite, SQACommonMethods): @staticmethod def expected_filtered_table_includes() -> int: - return 84 + return 134 @staticmethod def expected_filtered_table_excludes() -> int: @@ -125,4 +125,4 @@ class MysqlCliTest(CliCommonDB.TestSuite, SQACommonMethods): @staticmethod def expected_filtered_mix() -> int: - return 84 + return 134 diff --git a/ingestion/tests/cli_e2e/test_cli_oracle.py b/ingestion/tests/cli_e2e/test_cli_oracle.py index 3b9ba6e78ac..7eafd8e0a3f 100644 --- a/ingestion/tests/cli_e2e/test_cli_oracle.py +++ b/ingestion/tests/cli_e2e/test_cli_oracle.py @@ -15,6 +15,8 @@ Oracle E2E tests from typing import List +import pytest + from metadata.ingestion.api.status import Status from .base.e2e_types import E2EType @@ -139,6 +141,7 @@ SELECT * from names def expected_filtered_mix() -> int: return 43 + @pytest.mark.order(2) def test_create_table_with_profiler(self) -> None: # delete table in case it exists self.delete_table_and_view() @@ -162,6 +165,7 @@ SELECT * from names sink_status, source_status = self.retrieve_statuses(result) self.assert_for_table_with_profiler(source_status, sink_status) + @pytest.mark.order(4) def test_delete_table_is_marked_as_deleted(self) -> None: """3. delete the new table + deploy marking tables as deleted @@ -180,6 +184,7 @@ SELECT * from names sink_status, source_status = self.retrieve_statuses(result) self.assert_for_delete_table_is_marked_as_deleted(source_status, sink_status) + @pytest.mark.order(5) def test_schema_filter_includes(self) -> None: self.build_config_file( E2EType.INGEST_DB_FILTER_MIX, @@ -195,9 +200,11 @@ SELECT * from names sink_status, source_status = self.retrieve_statuses(result) self.assert_filtered_tables_includes(source_status, sink_status) + @pytest.mark.order(6) def test_schema_filter_excludes(self) -> None: pass + @pytest.mark.order(7) def test_table_filter_includes(self) -> None: """6. Vanilla ingestion + include table filter pattern @@ -217,6 +224,7 @@ SELECT * from names sink_status, source_status = self.retrieve_statuses(result) self.assert_filtered_tables_includes(source_status, sink_status) + @pytest.mark.order(1) def test_vanilla_ingestion(self) -> None: """6. Vanilla ingestion @@ -233,6 +241,7 @@ SELECT * from names sink_status, source_status = self.retrieve_statuses(result) self.assert_for_vanilla_ingestion(source_status, sink_status) + @pytest.mark.order(8) def test_table_filter_excludes(self) -> None: """7. Vanilla ingestion + exclude table filter pattern