Skip to content

Commit 11c6ad2

Browse files
committed
fix tests
1 parent 3337b02 commit 11c6ad2

File tree

7 files changed

+29
-4
lines changed

7 files changed

+29
-4
lines changed

.github/workflows/integration-tests-core.yml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,28 @@ jobs:
8484
env:
8585
CORE_URL: "http://localhost:3473"
8686
run: |
87-
pytest -o log_cli=true -o log_cli_level=INFO tests/integration/test_core_integration.py
87+
pytest -o log_cli=true -o log_cli_level=INFO tests/integration -k "core" --alluredir=allure-results
8888
8989
- name: Stop container
9090
if: always()
9191
run: |
9292
docker compose -f "$DOCKER_COMPOSE_FILE" down
93+
94+
# Need to pull the pages branch in order to fetch the previous runs
95+
- name: Get Allure history
96+
uses: actions/checkout@v4
97+
if: always()
98+
continue-on-error: true
99+
with:
100+
ref: gh-pages
101+
path: gh-pages
102+
103+
- name: Allure Report
104+
uses: firebolt-db/action-allure-report@v1
105+
if: always()
106+
with:
107+
github-key: ${{ secrets.GITHUB_TOKEN }}
108+
test-type: integration
109+
allure-dir: allure-results
110+
pages-branch: gh-pages
111+
repository-name: firebolt-sqlalchemy

.github/workflows/integration-tests-v1.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jobs:
5656
FIREBOLT_BASE_URL: "api.staging.firebolt.io"
5757
ACCOUNT_NAME: "firebolt"
5858
run: |
59-
pytest --last-failed -o log_cli=true -o log_cli_level=INFO tests/integration
59+
pytest --last-failed -o log_cli=true -o log_cli_level=INFO tests/integration -k "not core"
6060
6161
- name: Save failed tests
6262
id: cache-tests-save

.github/workflows/integration-tests-v2.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565
FIREBOLT_BASE_URL: "api.staging.firebolt.io"
6666
ACCOUNT_NAME: ${{ vars.FIREBOLT_ACCOUNT }}
6767
run: |
68-
pytest --last-failed -o log_cli=true -o log_cli_level=INFO tests/integration --alluredir=allure-results
68+
pytest --last-failed -o log_cli=true -o log_cli_level=INFO tests/integration -k "not core" --alluredir=allure-results
6969
7070
- name: Save failed tests
7171
id: cache-tests-save

tests/integration/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ def dimension_table_name() -> str:
190190
return "test_alchemy_dimension"
191191

192192

193-
@fixture(scope="class", autouse=True)
193+
@fixture(scope="class")
194194
def setup_test_tables(
195195
connection: Connection,
196196
engine: Engine,

tests/integration/test_core_integration.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1+
import pytest
12
from firebolt.client.auth import FireboltCore
23
from sqlalchemy import text
34
from sqlalchemy.engine.base import Connection, Engine
45

56

7+
@pytest.mark.core
68
class TestFireboltCoreIntegration:
79
def test_core_connection(self, core_connection: Connection):
810
"""Test that Core connection can be established."""

tests/integration/test_sqlalchemy_async_integration.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
from typing import Dict, List
22

3+
import pytest
34
from sqlalchemy import inspect, text
45
from sqlalchemy.engine.base import Connection, Engine
56

67

8+
@pytest.mark.usefixtures("setup_test_tables")
79
class TestAsyncFireboltDialect:
810
async def test_create_ex_table(
911
self,

tests/integration/test_sqlalchemy_integration.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,13 @@
11
from datetime import date, datetime
22
from decimal import Decimal
33

4+
import pytest
45
from sqlalchemy import create_engine, text
56
from sqlalchemy.engine.base import Connection, Engine
67
from sqlalchemy.types import ARRAY, INTEGER, TypeEngine
78

89

10+
@pytest.mark.usefixtures("setup_test_tables")
911
class TestFireboltDialect:
1012
def test_create_ex_table(
1113
self,

0 commit comments

Comments
 (0)