tests: skip test_pg_multisource_table_name_conflict if the setup isn't correct

GitOrigin-RevId: 4e658812eaac6534e6b6606f03e893449ad4b975
This commit is contained in:
Antoine Leblanc 2021-05-19 22:06:06 +01:00 committed by hasura-bot
parent ad0ecc7363
commit 03c70c7b7d

View File

@ -1,6 +1,7 @@
import ruamel.yaml as yaml
from validate import check_query_f
import pytest
import os
usefixtures = pytest.mark.usefixtures
@ -51,6 +52,11 @@ class TestMetadata:
def test_pg_multisource_query(self, hge_ctx):
check_query_f(hge_ctx, self.dir() + '/pg_multisource_query.yaml')
@pytest.mark.skipif(
os.getenv('HASURA_GRAPHQL_PG_SOURCE_URL_1') == os.getenv('HASURA_GRAPHQL_PG_SOURCE_URL_2') or
os.getenv('HASURA_GRAPHQL_PG_SOURCE_URL_1') is None or
os.getenv('HASURA_GRAPHQL_PG_SOURCE_URL_2') is None,
reason="We need two different and valid instances of postgres for this test.")
def test_pg_multisource_table_name_conflict(self, hge_ctx):
check_query_f(hge_ctx, self.dir() + '/pg_multisource_table_name_conflict.yaml')