Added integration test for connecting to Trino

This commit is contained in:
Pablo Martin 2023-01-20 15:01:07 +01:00
parent 28831bea8c
commit 1e0faf702f

View file

@ -0,0 +1,18 @@
import trino
from lolafect.lolaconfig import build_lolaconfig
from lolafect.connections import connect_to_trino
# This testing suite requires:
# - The calling shell to have permission in AWS
# - The calling shell to be within the Mercadão network
TEST_LOLACONFIG = build_lolaconfig(flow_name="testing-suite")
def test_that_trino_connector_works_properly():
connection = connect_to_trino.run(TEST_LOLACONFIG.TRINO_CREDENTIALS)
connection.cursor().execute("SELECT 1")
assert type(connection) == trino.dbapi.Connection