diff --git a/ingestion/tests/cli_e2e/test_cli_quicksight.py b/ingestion/tests/cli_e2e/test_cli_quicksight.py index 3c1aea2c3b7..ef1495e6f38 100644 --- a/ingestion/tests/cli_e2e/test_cli_quicksight.py +++ b/ingestion/tests/cli_e2e/test_cli_quicksight.py @@ -14,6 +14,8 @@ Test Quicksight connector with CLI """ from typing import List +from metadata.ingestion.api.status import Status + from .common.test_cli_dashboard import CliCommonDashboard @@ -50,7 +52,7 @@ class QuicksightCliTest(CliCommonDashboard.TestSuite): return 2 def expected_filtered_sink_mix(self) -> int: - return 2 + return 4 # Quicksight do not ingest tags def expected_tags(self) -> int: @@ -71,4 +73,34 @@ class QuicksightCliTest(CliCommonDashboard.TestSuite): return 0 def expected_dashboards_and_charts_after_patch(self) -> int: - return 0 + return 7 + + def assert_for_vanilla_ingestion( + self, source_status: Status, sink_status: Status + ) -> None: + """ + We are overriding this method because of diff. + of 1 in source and sink records + """ + self.assertTrue(len(source_status.failures) == 0) + self.assertTrue(len(source_status.warnings) == 0) + self.assertTrue(len(source_status.filtered) == 0) + self.assertEqual( + (len(source_status.records) + len(source_status.updated_records)), + self.expected_dashboards_and_charts_after_patch() + + self.expected_tags() + + self.expected_lineage() + + self.expected_datamodels() + + self.expected_datamodel_lineage(), + ) + self.assertTrue(len(sink_status.failures) == 0) + self.assertTrue(len(sink_status.warnings) == 0) + # We are getting here diff of 1 element in case of the service ingested. + self.assertTrue( + (len(sink_status.records) + len(sink_status.updated_records)) + <= self.expected_dashboards_and_charts_after_patch() + + self.expected_tags() + + self.expected_lineage() + + self.expected_datamodels() + + self.expected_datamodel_lineage(), + )