Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PYTHON-2608 Fix KMS TLS testing on Python <3.5 #671

Merged
merged 3 commits into from Jul 12, 2021

Conversation

ShaneHarvey
Copy link
Member

When I backported PYTHON-2608 I didn't realize that the mock KMS script requires Python 3.5+. For <3.5 we need to create yet another virtualenv. This fixes the encryption tests on v3.12.

pushd ${DRIVERS_TOOLS}/.evergreen/csfle
python -u lib/kms_http_server.py --ca_file ../x509gen/ca.pem --cert_file ../x509gen/expired.pem --port 8000 &
python -u lib/kms_http_server.py --ca_file ../x509gen/ca.pem --cert_file ../x509gen/wrong-host.pem --port 8001 &
trap 'kill $(jobs -p)' EXIT HUP
popd
# Restore the test virtualenv.
if [ $IS_PRE_35 = "1" ]; then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add an activatevritualenv function to utils.sh and just call that from both createvirtualenv and also here? It'll be much cleaner.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

@ShaneHarvey
Copy link
Member Author

ShaneHarvey commented Jul 12, 2021

I had to revert the activatevritualenv change because it doesn't work. After that change the tests no longer ran in the venv where pymongocrypt was installed and all the encrypt tests were skipped:

[2021/07/12 22:43:00.617] SKIPPED: pymongocrypt is not installed (skip)

Not sure what exactly the issue was but it's simpler to revert.

@ShaneHarvey ShaneHarvey merged commit a8f626d into mongodb:v3.12 Jul 12, 2021
@ShaneHarvey ShaneHarvey deleted the PYTHON-2608-fix-3.12 branch July 12, 2021 23:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants