Skip to content

Commit

Permalink
SNOW-215851 allow cryptography to use unsupported openssl (#510)
Browse files Browse the repository at this point in the history
* allow cryptography to use unsupported openssl

* added fips test job
  • Loading branch information
sfc-gh-mkeller committed Nov 3, 2020
1 parent 3d28f7b commit 0a95f14
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 1 deletion.
46 changes: 45 additions & 1 deletion .github/workflows/build_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -241,10 +241,54 @@ jobs:
.tox/.coverage
.tox/coverage.xml
test-fips:
name: Test FIPS linux-3.6-${{ matrix.cloud-provider }}
needs: build-manylinux
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
cloud-provider: [aws]
steps:
- uses: actions/checkout@v2
- name: Setup parameters file
shell: bash
env:
PARAMETERS_SECRET: ${{ secrets.PARAMETERS_SECRET }}
run: |
gpg --quiet --batch --yes --decrypt --passphrase="$PARAMETERS_SECRET" \
.github/workflows/parameters/public/parameters_${{ matrix.cloud-provider }}.py.gpg > test/parameters.py
- name: Download wheel(s)
uses: actions/download-artifact@v2
with:
name: linux_py3.6
path: dist
- name: Show wheels downloaded
run: ls -lh dist
shell: bash
- name: Remove manylinux1 wheel
run: |
rm dist/*manylinux1*.whl
ls -lh dist
- name: Run tests
run: ./ci/test_fips_docker.sh
env:
PYTHON_VERSION: 3.6
cloud_provider: ${{ matrix.cloud-provider }}
PYTEST_ADDOPTS: --color=yes
TOX_PARALLEL_NO_SPINNER: 1
shell: bash
- uses: actions/upload-artifact@v2
with:
name: coverage_linux-fips-3.6-${{ matrix.cloud-provider }}
path: |
.coverage
coverage.xml
combine-coverage:
if: ${{ success() || failure() }}
name: Combine coverage
needs: test
needs: [test, test-fips]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand Down
2 changes: 2 additions & 0 deletions ci/test_fips_docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,13 @@ docker run --network=host \
-e SF_USE_OPENSSL_ONLY=True \
-e PIP_DISABLE_PIP_VERSION_CHECK=1 \
-e LOCAL_USER_ID=$user_id \
-e CRYPTOGRAPHY_ALLOW_OPENSSL_102=1 \
-e AWS_ACCESS_KEY_ID \
-e AWS_SECRET_ACCESS_KEY \
-e SF_REGRESS_LOGS \
-e SF_PROJECT_ROOT \
-e cloud_provider \
-e PYTEST_ADDOPTS \
--mount type=bind,source="${CONNECTOR_DIR}",target=/home/user/snowflake-connector-python \
${CONTAINER_NAME}:1.0 \
/home/user/snowflake-connector-python/ci/test_fips.sh $1
1 change: 1 addition & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ source = src/snowflake/connector
*/.tox\*\Lib\site-packages\snowflake\connector
*/src/snowflake/connector
*\src\snowflake\connector
*/fips_env/lib/python*/site-packages/snowflake/connector

[tox]
minversion = 3.7
Expand Down

0 comments on commit 0a95f14

Please sign in to comment.