Skip to content

Commit

Permalink
update integration tests, fix tests for bigquery
Browse files Browse the repository at this point in the history
  • Loading branch information
Kyle Wigley committed Apr 22, 2021
1 parent ac8cd78 commit 15fa927
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 9 deletions.
3 changes: 2 additions & 1 deletion test/integration/005_simple_seed_test/macros/schema_test.sql
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
{% endif %}

select '{{ validation_message }}' as validation_error
where {{ val }} = 1
from (select true)
where {{ val }} = 1

{% endtest %}
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
{% set success = 1 if model and actual == expected else 0 %}

select 'Expected {{ expected }}, but got {{ actual }}' as validation_error
from (select true)
where {{ success }} = 0

{% endtest %}
8 changes: 4 additions & 4 deletions test/integration/022_bigquery_test/macros/test_creation.sql
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
{%- set table = {} -%}
{%- endif -%}

{% if table and table.type == type %}
select 0 as success
{% else %}
select 1 as error
{% if table %}
select '{{ table.type }} does not match expected value {{ type }}'
from (select true)
where '{{ table.type }}' != '{{ type }}'
{% endif %}

{% endtest %}
Original file line number Diff line number Diff line change
Expand Up @@ -64,5 +64,9 @@
{% endif %}
{% endfor %}
{% do log('bad columns: ' ~ bad_columns, info=True) %}
select * from unnest(string_to_array('{{ bad_columns|join(',') }}', ','))
{% for bad_column in bad_columns %}
select '{{ bad_column }}' as bad_column
{{ 'union all' if not loop.last }}
{% endfor %}
select * from (select 1 limit 0)
{% endtest %}
3 changes: 0 additions & 3 deletions test/integration/056_column_type_tests/test_column_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ def models(self):
def test_postgres_column_types(self):
self.run_and_test()

@pytest.mark.skip("Temporarily skipping while implementing the handling of test results.")
class TestRedshiftColumnTypes(TestColumnTypes):
@property
def models(self):
Expand All @@ -32,7 +31,6 @@ def test_redshift_column_types(self):
self.run_and_test()


@pytest.mark.skip("Temporarily skipping while implementing the handling of test results.")
class TestSnowflakeColumnTypes(TestColumnTypes):
@property
def models(self):
Expand All @@ -43,7 +41,6 @@ def test_snowflake_column_types(self):
self.run_and_test()


@pytest.mark.skip("Temporarily skipping while implementing the handling of test results.")
class TestBigQueryColumnTypes(TestColumnTypes):
@property
def models(self):
Expand Down

0 comments on commit 15fa927

Please sign in to comment.