Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions ci/container/test_authentication.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ export RUN_AUTH_TESTS=true
export AUTHENTICATION_TESTS_ENV="docker"
export PYTHONPATH=$SOURCE_ROOT

python3 -m pip install --break-system-packages -e .
python3 -m pip install --break-system-packages -e ".[develompent]"

python3 -m pytest test/auth/*
python3 -m pytest test/auth/* -m "not aio"

python3 -m pip install --break-system-packages -e ".[aio, aioboto]"
python3 -m pytest test/auth/* -m "aio"
2 changes: 1 addition & 1 deletion ci/test_darwin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ for PYTHON_VERSION in ${PYTHON_VERSIONS}; do
SHORT_VERSION=$(python3 -c "print('${PYTHON_VERSION}'.replace('.', ''))")
CONNECTOR_WHL=$(ls ${CONNECTOR_DIR}/dist/snowflake_connector_python*cp${SHORT_VERSION}*.whl)
# pandas not tested here because of macos issue: SNOW-1660226
TEST_ENVLIST=$(python3 -c "print('fix_lint,' + ','.join('py${SHORT_VERSION}-' + e + '-ci' for e in ['unit','integ','sso']) + ',py${SHORT_VERSION}-coverage')")
TEST_ENVLIST=$(python3 -c "print('fix_lint,' + ','.join('py${SHORT_VERSION}-' + e + '-ci' for e in ['unit','integ','sso','aio']) + ',py${SHORT_VERSION}-coverage')")
echo "[Info] Running tox for ${TEST_ENVLIST}"
python3.12 -m tox run -e ${TEST_ENVLIST} --installpkg ${CONNECTOR_WHL}
done
Expand Down
9 changes: 6 additions & 3 deletions ci/test_fips.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ pip install -U setuptools pip
# Install pytest-xdist for parallel execution
pip install pytest-xdist

pip install "${CONNECTOR_WHL}[pandas,secure-local-storage,development]"
pip install "${CONNECTOR_WHL}[pandas,secure-local-storage,development,aio,aioboto]"

echo "!!! Environment description !!!"
echo "Default installed OpenSSL version"
Expand All @@ -29,7 +29,10 @@ pip freeze

cd $CONNECTOR_DIR

# Run tests in parallel using pytest-xdist
pytest -n auto -vvv --cov=snowflake.connector --cov-report=xml:coverage.xml test --ignore=test/integ/aio_it --ignore=test/unit/aio --ignore=test/wif/test_wif_async.py
# Run tests in parallel using pytest-xdist (including aio tests)
pytest -n auto -vvv --cov=snowflake.connector --cov-report=xml:coverage.xml -m "not aio" test --ignore=test/integ/aio_it --ignore=test/unit/aio --ignore=test/wif/test_wif_async.py
# Run aio tests separately
pytest -n auto -vvv --cov=snowflake.connector --cov-append --cov-report=xml:coverage.xml -m "aio and unit" test
pytest -n auto -vvv --cov=snowflake.connector --cov-append --cov-report=xml:coverage.xml -m "aio and integ" test

deactivate
2 changes: 1 addition & 1 deletion ci/test_linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ else
echo "[Info] Testing with ${PYTHON_VERSION}"
SHORT_VERSION=$(python3.10 -c "print('${PYTHON_VERSION}'.replace('.', ''))")
CONNECTOR_WHL=$(ls $CONNECTOR_DIR/dist/snowflake_connector_python*cp${SHORT_VERSION}*manylinux2014*.whl | sort -r | head -n 1)
TEST_LIST=`echo py${PYTHON_VERSION/\./}-{unit-parallel,integ,pandas-parallel,sso}-ci | sed 's/ /,/g'`
TEST_LIST=`echo py${PYTHON_VERSION/\./}-{unit-parallel,integ,pandas-parallel,sso,aio}-ci | sed 's/ /,/g'`
TEST_ENVLIST=fix_lint,$TEST_LIST,py${PYTHON_VERSION/\./}-coverage
echo "[Info] Running tox for ${TEST_ENVLIST}"

Expand Down
2 changes: 1 addition & 1 deletion ci/test_windows.bat
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ curl https://repo1.maven.org/maven2/org/wiremock/wiremock-standalone/3.11.0/wire
set JUNIT_REPORT_DIR=%workspace%
set COV_REPORT_DIR=%workspace%

set TEST_ENVLIST=fix_lint,py%pv%-unit-ci,py%pv%-integ-ci,py%pv%-pandas-ci,py%pv%-sso-ci,py%pv%-coverage
set TEST_ENVLIST=fix_lint,py%pv%-unit-ci,py%pv%-integ-ci,py%pv%-pandas-ci,py%pv%-sso-ci,py%pv%-aio-ci,py%pv%-coverage
tox -e %TEST_ENVLIST% --installpkg %connector_whl%
if %errorlevel% neq 0 goto :error

Expand Down
16 changes: 16 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,22 @@ commands =
{env:SNOWFLAKE_PYTEST_CMD} -n auto -m "aio and unit" -vvv {posargs:} test
{env:SNOWFLAKE_PYTEST_CMD} -n auto -m "aio and integ" -vvv {posargs:} test

[testenv:py{39,310,311,312,313}-aio]
description = Run aio tests for {basepython}
extras=
development
aio
aioboto
pandas
secure-local-storage
setenv =
{[testenv]setenv}
SNOWFLAKE_TEST_TYPE = unit
passenv = {[testenv]passenv}
commands =
{env:SNOWFLAKE_PYTEST_CMD} -n auto -m "aio and unit" -vvv {posargs:} test
{env:SNOWFLAKE_PYTEST_CMD} -n auto -m "aio and integ" -vvv {posargs:} test

[testenv:aio-unsupported-python]
description = Run aio connector on unsupported python versions
extras=
Expand Down
Loading