mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-11-10 15:59:57 +00:00
Minor: Fix e2e count mismatch (#14352)
* Minor: Fix e2e count mismatch * fix dbt test * fix pyformat * use > instead of ==
This commit is contained in:
parent
2337e239a4
commit
f53fcf9168
@ -21,6 +21,10 @@ source:
|
|||||||
sourceConfig:
|
sourceConfig:
|
||||||
config:
|
config:
|
||||||
type: DatabaseMetadata
|
type: DatabaseMetadata
|
||||||
|
schemaFilterPattern:
|
||||||
|
includes:
|
||||||
|
- do_not_touch
|
||||||
|
- exclude_me
|
||||||
sink:
|
sink:
|
||||||
type: metadata-rest
|
type: metadata-rest
|
||||||
config: {}
|
config: {}
|
||||||
|
|||||||
@ -14,6 +14,8 @@ Test Bigquery connector with CLI
|
|||||||
"""
|
"""
|
||||||
from typing import List
|
from typing import List
|
||||||
|
|
||||||
|
from metadata.ingestion.api.status import Status
|
||||||
|
|
||||||
from .base.e2e_types import E2EType
|
from .base.e2e_types import E2EType
|
||||||
from .common.test_cli_db import CliCommonDB
|
from .common.test_cli_db import CliCommonDB
|
||||||
from .common_e2e_sqa_mixins import SQACommonMethods
|
from .common_e2e_sqa_mixins import SQACommonMethods
|
||||||
@ -102,15 +104,15 @@ class BigqueryCliTest(CliCommonDB.TestSuite, SQACommonMethods):
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def expected_filtered_table_includes() -> int:
|
def expected_filtered_table_includes() -> int:
|
||||||
return 9
|
|
||||||
|
|
||||||
@staticmethod
|
|
||||||
def expected_filtered_table_excludes() -> int:
|
|
||||||
return 10
|
return 10
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def expected_filtered_table_excludes() -> int:
|
||||||
|
return 11
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def expected_filtered_mix() -> int:
|
def expected_filtered_mix() -> int:
|
||||||
return 9
|
return 10
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def delete_queries() -> List[str]:
|
def delete_queries() -> List[str]:
|
||||||
@ -128,6 +130,17 @@ class BigqueryCliTest(CliCommonDB.TestSuite, SQACommonMethods):
|
|||||||
""",
|
""",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
def assert_for_vanilla_ingestion(
|
||||||
|
self, source_status: Status, sink_status: Status
|
||||||
|
) -> None:
|
||||||
|
self.assertTrue(len(source_status.failures) == 0)
|
||||||
|
self.assertTrue(len(source_status.warnings) == 0)
|
||||||
|
self.assertTrue(len(source_status.filtered) >= 9)
|
||||||
|
self.assertTrue(len(source_status.records) >= self.expected_tables())
|
||||||
|
self.assertTrue(len(sink_status.failures) == 0)
|
||||||
|
self.assertTrue(len(sink_status.warnings) == 0)
|
||||||
|
self.assertTrue(len(sink_status.records) > self.expected_tables())
|
||||||
|
|
||||||
def test_create_table_with_profiler(self) -> None:
|
def test_create_table_with_profiler(self) -> None:
|
||||||
# delete table in case it exists
|
# delete table in case it exists
|
||||||
self.delete_table_and_view()
|
self.delete_table_and_view()
|
||||||
|
|||||||
@ -67,7 +67,7 @@ class DbtCliTest(CliDBTBase.TestSuite):
|
|||||||
) -> None:
|
) -> None:
|
||||||
self.assertTrue(len(source_status.failures) == 0)
|
self.assertTrue(len(source_status.failures) == 0)
|
||||||
self.assertTrue(len(source_status.warnings) == 0)
|
self.assertTrue(len(source_status.warnings) == 0)
|
||||||
self.assertTrue(len(source_status.filtered) == 9)
|
self.assertTrue(len(source_status.filtered) >= 10)
|
||||||
self.assertTrue(len(source_status.records) >= self.expected_tables())
|
self.assertTrue(len(source_status.records) >= self.expected_tables())
|
||||||
self.assertTrue(len(sink_status.failures) == 0)
|
self.assertTrue(len(sink_status.failures) == 0)
|
||||||
self.assertTrue(len(sink_status.warnings) == 0)
|
self.assertTrue(len(sink_status.warnings) == 0)
|
||||||
|
|||||||
@ -117,7 +117,7 @@ class MysqlCliTest(CliCommonDB.TestSuite, SQACommonMethods):
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def expected_filtered_table_includes() -> int:
|
def expected_filtered_table_includes() -> int:
|
||||||
return 63
|
return 64
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def expected_filtered_table_excludes() -> int:
|
def expected_filtered_table_excludes() -> int:
|
||||||
@ -125,4 +125,4 @@ class MysqlCliTest(CliCommonDB.TestSuite, SQACommonMethods):
|
|||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def expected_filtered_mix() -> int:
|
def expected_filtered_mix() -> int:
|
||||||
return 63
|
return 64
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user