Skip to content

Commit 0a95f14

Browse files
SNOW-215851 allow cryptography to use unsupported openssl (#510)
* allow cryptography to use unsupported openssl * added fips test job
1 parent 3d28f7b commit 0a95f14

File tree

3 files changed

+48
-1
lines changed

3 files changed

+48
-1
lines changed

.github/workflows/build_test.yml

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,10 +241,54 @@ jobs:
241241
.tox/.coverage
242242
.tox/coverage.xml
243243
244+
test-fips:
245+
name: Test FIPS linux-3.6-${{ matrix.cloud-provider }}
246+
needs: build-manylinux
247+
runs-on: ubuntu-latest
248+
strategy:
249+
fail-fast: false
250+
matrix:
251+
cloud-provider: [aws]
252+
steps:
253+
- uses: actions/checkout@v2
254+
- name: Setup parameters file
255+
shell: bash
256+
env:
257+
PARAMETERS_SECRET: ${{ secrets.PARAMETERS_SECRET }}
258+
run: |
259+
gpg --quiet --batch --yes --decrypt --passphrase="$PARAMETERS_SECRET" \
260+
.github/workflows/parameters/public/parameters_${{ matrix.cloud-provider }}.py.gpg > test/parameters.py
261+
- name: Download wheel(s)
262+
uses: actions/download-artifact@v2
263+
with:
264+
name: linux_py3.6
265+
path: dist
266+
- name: Show wheels downloaded
267+
run: ls -lh dist
268+
shell: bash
269+
- name: Remove manylinux1 wheel
270+
run: |
271+
rm dist/*manylinux1*.whl
272+
ls -lh dist
273+
- name: Run tests
274+
run: ./ci/test_fips_docker.sh
275+
env:
276+
PYTHON_VERSION: 3.6
277+
cloud_provider: ${{ matrix.cloud-provider }}
278+
PYTEST_ADDOPTS: --color=yes
279+
TOX_PARALLEL_NO_SPINNER: 1
280+
shell: bash
281+
- uses: actions/upload-artifact@v2
282+
with:
283+
name: coverage_linux-fips-3.6-${{ matrix.cloud-provider }}
284+
path: |
285+
.coverage
286+
coverage.xml
287+
244288
combine-coverage:
245289
if: ${{ success() || failure() }}
246290
name: Combine coverage
247-
needs: test
291+
needs: [test, test-fips]
248292
runs-on: ubuntu-latest
249293
steps:
250294
- uses: actions/checkout@v2

ci/test_fips_docker.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,13 @@ docker run --network=host \
2424
-e SF_USE_OPENSSL_ONLY=True \
2525
-e PIP_DISABLE_PIP_VERSION_CHECK=1 \
2626
-e LOCAL_USER_ID=$user_id \
27+
-e CRYPTOGRAPHY_ALLOW_OPENSSL_102=1 \
2728
-e AWS_ACCESS_KEY_ID \
2829
-e AWS_SECRET_ACCESS_KEY \
2930
-e SF_REGRESS_LOGS \
3031
-e SF_PROJECT_ROOT \
3132
-e cloud_provider \
33+
-e PYTEST_ADDOPTS \
3234
--mount type=bind,source="${CONNECTOR_DIR}",target=/home/user/snowflake-connector-python \
3335
${CONTAINER_NAME}:1.0 \
3436
/home/user/snowflake-connector-python/ci/test_fips.sh $1

tox.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ source = src/snowflake/connector
1111
*/.tox\*\Lib\site-packages\snowflake\connector
1212
*/src/snowflake/connector
1313
*\src\snowflake\connector
14+
*/fips_env/lib/python*/site-packages/snowflake/connector
1415

1516
[tox]
1617
minversion = 3.7

0 commit comments

Comments
 (0)