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

Update Python scripts to use the venv module #801

Merged
merged 18 commits into from Mar 7, 2024
35 changes: 29 additions & 6 deletions tests/mongo-go-driver.yml
Expand Up @@ -34,6 +34,16 @@ results:
- go.mongodb.org/mongo-driver/internal/integration/TestCausalConsistency_NotSupported
- go.mongodb.org/mongo-driver/internal/integration/TestCausalConsistency_NotSupported/afterClusterTime_not_included
- go.mongodb.org/mongo-driver/internal/integration/TestCausalConsistency_Supported
# unknown field \"startTransaction\"
- go.mongodb.org/mongo-driver/mongo/TestConvenientTransactions
- go.mongodb.org/mongo-driver/mongo/TestConvenientTransactions/abortTransaction_does_not_time_out
- go.mongodb.org/mongo-driver/mongo/TestConvenientTransactions/commitTransaction_timeout_allows_abortTransaction
- go.mongodb.org/mongo-driver/mongo/TestConvenientTransactions/context_error_before_commitTransaction_does_not_retry_and_aborts
# no such command: 'configureFailPoint'
- go.mongodb.org/mongo-driver/mongo/TestConvenientTransactions/retry_timeout_enforced
- go.mongodb.org/mongo-driver/mongo/TestConvenientTransactions/retry_timeout_enforced/commit_transient_transaction_error
- go.mongodb.org/mongo-driver/mongo/TestConvenientTransactions/retry_timeout_enforced/unknown_transaction_commit_result
- go.mongodb.org/mongo-driver/mongo/TestConvenientTransactions/slow_operation_in_callback_retries
skip:
- go.mongodb.org/mongo-driver/internal/integration/TestChangeStream_ReplicaSet
- go.mongodb.org/mongo-driver/x/mongo/driver/integration/TestCompression
Expand All @@ -44,6 +54,8 @@ results:
- go.mongodb.org/mongo-driver/x/mongo/driver/topology/TestCMAPSpec/pool-checkout-returned-connection-maxConnecting.json
- go.mongodb.org/mongo-driver/x/mongo/driver/topology/TestCMAPSpec/pool-close-destroy-conns.json
- go.mongodb.org/mongo-driver/x/mongo/driver/topology/TestCMAPSpec/pool-create-min-size-error.json
- go.mongodb.org/mongo-driver/mongo/TestClient/mongocryptd_or_crypt_shared
- go.mongodb.org/mongo-driver/mongo/TestOCSP
pass:
- go.mongodb.org/mongo-driver/internal/integration/TestClient/
- go.mongodb.org/mongo-driver/internal/docexamples/TestDocumentationExamples/DeleteExamples
Expand Down Expand Up @@ -131,6 +143,17 @@ results:
- go.mongodb.org/mongo-driver/mongo/TestClient/replace_topology_error
- go.mongodb.org/mongo-driver/mongo/TestClient/retry_reads
- go.mongodb.org/mongo-driver/mongo/TestClient/retry_reads/custom_URI
- go.mongodb.org/mongo-driver/internal/integration/TestCausalConsistency_Supported/no_cluster_time_on_first_command
- go.mongodb.org/mongo-driver/mongo/TestClient/serverAPI_version
- go.mongodb.org/mongo-driver/mongo/TestClient/serverAPI_version/cannot_modify_options_after_client_creation
- go.mongodb.org/mongo-driver/mongo/TestClient/serverAPI_version/failure_with_unsupported_version
- go.mongodb.org/mongo-driver/mongo/TestClient/serverAPI_version/success_with_all_options
- go.mongodb.org/mongo-driver/mongo/TestConvenientTransactions/callback_raises_custom_error
- go.mongodb.org/mongo-driver/mongo/TestConvenientTransactions/callback_returns_value
- go.mongodb.org/mongo-driver/mongo/TestConvenientTransactions/canceled_context_before_callback_does_not_retry
- go.mongodb.org/mongo-driver/mongo/TestConvenientTransactions/expired_context_before_callback_does_not_retry
- go.mongodb.org/mongo-driver/mongo/TestConvenientTransactions/retry_timeout_enforced/transient_transaction_error
- go.mongodb.org/mongo-driver/mongo/TestConvenientTransactions/wrapped_transient_transaction_error_retried

ignore:
# indicates flaky tests that should be ignored
Expand All @@ -157,9 +180,9 @@ results:

postgresql:
stats:
fail: 6
skip: 8
pass: 634
fail: 15
skip: 10
pass: 791
ignore:
include_ignore:
- ignore
Expand All @@ -175,9 +198,9 @@ results:

sqlite:
stats:
fail: 6
skip: 8
pass: 634
fail: 15
skip: 10
pass: 791
ignore:
include_ignore:
- ignore
Expand Down
14 changes: 5 additions & 9 deletions tests/mongo.yml
Expand Up @@ -178,11 +178,7 @@ results:
- mongo/jstests/core/write/find_and_modify/find_and_modify.js
- mongo/jstests/core/write/find_and_modify/find_and_modify2.js
- mongo/jstests/core/write/find_and_modify/find_and_modify3.js
- mongo/jstests/core/write/find_and_modify/find_and_modify4.js
# https://github.com/FerretDB/FerretDB/issues/1855
- mongo/jstests/core/write/update/update8.js
# https://github.com/FerretDB/FerretDB/issues/1742
- mongo/jstests/core/write/update/updateb.js
# https://github.com/FerretDB/FerretDB/issues/822
- mongo/jstests/core/write/update/updatel.js
# https://docs.ferretdb.io/diff/
# 5. Document restrictions:
Expand All @@ -200,8 +196,8 @@ results:

postgresql:
stats:
fail: 71
pass: 46
fail: 68
pass: 49
fail:
include_fail:
- aggregation
Expand All @@ -214,8 +210,8 @@ results:

sqlite:
stats:
fail: 71
pass: 46
fail: 68
pass: 49
fail:
include_fail:
- aggregation
Expand Down
2 changes: 1 addition & 1 deletion tests/python-example
7 changes: 6 additions & 1 deletion tests/python-example-auth-scram-sha-1.sh
Expand Up @@ -2,6 +2,11 @@

set -ex

pip3 install pymongo
pip install --user pipenv

pipenv --python $(python3 -c 'import sys; print(".".join(map(str, sys.version_info[:3])))')

. $(pipenv --venv)/bin/activate
b1ron marked this conversation as resolved.
Show resolved Hide resolved
pipenv install

python3 pymongo_test.py 'mongodb://user:password@localhost:27017/?replicaSet=rs0&authMechanism=SCRAM-SHA-1'
7 changes: 6 additions & 1 deletion tests/python-example-auth-scram-sha-256.sh
Expand Up @@ -2,6 +2,11 @@

set -ex

pip3 install pymongo
pip install --user pipenv

pipenv --python $(python3 -c 'import sys; print(".".join(map(str, sys.version_info[:3])))')

. $(pipenv --venv)/bin/activate
pipenv install

python3 pymongo_test.py 'mongodb://user:password@localhost:27017/?replicaSet=rs0&authMechanism=SCRAM-SHA-256'
7 changes: 6 additions & 1 deletion tests/python-example-auth.sh
Expand Up @@ -2,6 +2,11 @@

set -ex

pip3 install pymongo
pip install --user pipenv

pipenv --python $(python3 -c 'import sys; print(".".join(map(str, sys.version_info[:3])))')

. $(pipenv --venv)/bin/activate
pipenv install

python3 pymongo_test.py 'mongodb://user:password@localhost:27017/?authMechanism=PLAIN'
7 changes: 6 additions & 1 deletion tests/python-example.sh
Expand Up @@ -2,6 +2,11 @@

set -ex

pip3 install pymongo
pip install --user pipenv

pipenv --python $(python3 -c 'import sys; print(".".join(map(str, sys.version_info[:3])))')

. $(pipenv --venv)/bin/activate
pipenv install

python3 pymongo_test.py mongodb://localhost:27017/