From 0faf9bb0095f01472785f9549597f85e2d6a9e70 Mon Sep 17 00:00:00 2001 From: Aleksandar Milicevic Date: Fri, 13 Oct 2023 22:16:25 +0000 Subject: [PATCH] add delta_table3_expected in test --- tests/functional/plugins/test_delta.py | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/tests/functional/plugins/test_delta.py b/tests/functional/plugins/test_delta.py index f8b2e25c..856abedd 100644 --- a/tests/functional/plugins/test_delta.py +++ b/tests/functional/plugins/test_delta.py @@ -47,6 +47,10 @@ select * as a from {{ source('delta_source_test', 'table_2') }} WHERE y = 'd' """ +delta3_sql_expected = """ + select 1 as x, 'a' as y +""" + @pytest.mark.skip_profile("buenavista", "md") class TestPlugins: @@ -68,8 +72,8 @@ def delta_test_table2(self): table_path = path / "test_delta_table2" df = pd.DataFrame({ - "x": [1, 2, 3, 2, 3, 4, 5, 6], - "y": ["a", "b", "b", "c", "d", "c", "d", "a"] + "x": [1], + "y": ["a"] }) write_deltalake(table_path, df, mode="overwrite") @@ -109,11 +113,19 @@ def models(self, delta_test_table1,delta_test_table2): "delta_table1.sql": delta1_sql, "delta_table2.sql": delta2_sql, "delta_table3.sql": delta3_sql, + "delta_table3_expected.sql": delta3_sql_expected, } def test_plugins(self, project): results = run_dbt() - assert len(results) == 3 - + assert len(results) == 4 + + # check_relations_equal( + # project.adapter, + # [ + # "delta_table3", + # "delta_table3_expected", + # ], + # ) # res = project.run_sql("SELECT count(1) FROM 'delta_table3'", fetch="one") # assert res[0] == 2