File tree Expand file tree Collapse file tree 5 files changed +39
-3
lines changed Expand file tree Collapse file tree 5 files changed +39
-3
lines changed Original file line number Diff line number Diff line change @@ -145,9 +145,11 @@ jobs:
145145 env :
146146 LOCALSTACK_API_KEY : ${{ secrets.LOCALSTACK_API_KEY }}
147147 run : |
148- docker pull localstack/snowflake &
148+ image_name=localstack/snowflake
149+ # image_name=whummer/snowflake-tmp
150+ docker pull $image_name &
149151 pip install localstack
150- IMAGE_NAME=localstack/snowflake DEBUG=1 localstack start -d
152+ IMAGE_NAME=$image_name DEBUG=1 localstack start -d
151153 localstack wait
152154
153155# - name: Setup parameters file
@@ -178,6 +180,7 @@ jobs:
178180 PYTEST_ADDOPTS : --color=yes --tb=short
179181 TOX_PARALLEL_NO_SPINNER : 1
180182 shell : bash
183+ timeout-minutes : 15
181184 - name : Combine coverages
182185 run : python -m tox run -e coverage --skip-missing-interpreters false
183186 shell : bash
Original file line number Diff line number Diff line change @@ -79,6 +79,7 @@ console_scripts =
7979
8080[options.extras_require]
8181development =
82+ boto3
8283 Cython
8384 coverage
8485 more-itertools
Original file line number Diff line number Diff line change @@ -83,6 +83,35 @@ def print_help() -> None:
8383 )
8484
8585
86+ # START changes for LocalStack
87+
88+
89+ @pytest .fixture (scope = "session" , autouse = True )
90+ def create_external_volume ():
91+ import boto3
92+
93+ # create S3 bucket in LocalStack
94+ s3_client = boto3 .client (
95+ "s3" ,
96+ endpoint_url = "http://localhost:4566" ,
97+ aws_access_key_id = "test" ,
98+ aws_secret_access_key = "test" ,
99+ )
100+ s3_client .create_bucket (Bucket = "test" )
101+
102+ # create a local external volume which is required by some of the tests
103+ query = (
104+ "CREATE EXTERNAL VOLUME IF NOT EXISTS python_connector_iceberg_exvol STORAGE_LOCATIONS = "
105+ "((NAME = 'sl1' STORAGE_PROVIDER='S3' STORAGE_BASE_URL='s3://test' "
106+ "STORAGE_AWS_ROLE_ARN='arn:aws:iam::000000000000:role/test'))"
107+ )
108+ connection = create_connection ("default" )
109+ connection .cursor ().execute (query )
110+
111+
112+ # END changes for LocalStack
113+
114+
86115@pytest .fixture (scope = "session" )
87116def is_public_test () -> bool :
88117 return is_public_testaccount ()
Original file line number Diff line number Diff line change @@ -1556,6 +1556,9 @@ def test_resultbatch(
15561556 assert total_rows == rowcount
15571557
15581558
1559+ @pytest .mark .skip (
1560+ reason = "Multi-batches and large result sets currently not yet working in LocalStack"
1561+ )
15591562@pytest .mark .skipolddriver (reason = "new feature in v2.5.0" )
15601563@pytest .mark .parametrize (
15611564 "result_format,patch_path" ,
Original file line number Diff line number Diff line change @@ -131,7 +131,7 @@ deps = flake8
131131commands = flake8 {posargs}
132132
133133[testenv:fix_lint]
134- basepython = python3.8
134+ # basepython = python3.8
135135description = format the code base to adhere to our styles, and complain about what we cannot do automatically
136136passenv =
137137 PROGRAMDATA
You can’t perform that action at this time.
0 commit comments