Skip to content

Commit

Permalink
Setup smoke integration test
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicoretti committed Apr 24, 2024
1 parent e05f1f0 commit 8525e77
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 2 deletions.
34 changes: 34 additions & 0 deletions test/integration/conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import os
import pytest
import pyexasol


@pytest.fixture
def dsn():
return os.environ.get('EXAHOST', 'localhost:8563')


@pytest.fixture
def user():
return os.environ.get('EXAUID', 'SYS')


@pytest.fixture
def password():
return os.environ.get('EXAPWD', 'exasol')


@pytest.fixture
def schema():
return os.environ.get('EXASCHEMA', 'TEST')


@pytest.fixture
def connection(dsn, user, password, schema):
con = pyexasol.connect(
dsn=dsn,
user=user,
password=password,
)
yield con
con.close()
7 changes: 5 additions & 2 deletions test/integration/integration_smoke_test.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
def test_smoke():
assert True
def test_smoke(connection):
result = connection.execute("SELECT 1;")
expected = (1,)
actual = result.fetchall()[0]
assert expected == actual

0 comments on commit 8525e77

Please sign in to comment.