Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 0 additions & 62 deletions .evergreen/generated_configs/tasks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -317,68 +317,6 @@ tasks:
TOPOLOGY: sharded_cluster
tags: [test-min-support]

# Mod wsgi tests
- name: mod-wsgi-replica-set-python3.10
commands:
- func: run server
vars:
TOPOLOGY: replica_set
TOOLCHAIN_VERSION: "3.10"
- func: run tests
vars:
TEST_NAME: mod_wsgi
SUB_TEST_NAME: standalone
TOOLCHAIN_VERSION: "3.10"
tags: [mod_wsgi, pr]
- name: mod-wsgi-embedded-mode-replica-set-python3.11
commands:
- func: run server
vars:
TOPOLOGY: replica_set
TOOLCHAIN_VERSION: "3.11"
- func: run tests
vars:
TEST_NAME: mod_wsgi
SUB_TEST_NAME: embedded
TOOLCHAIN_VERSION: "3.11"
tags: [mod_wsgi, pr]
- name: mod-wsgi-replica-set-python3.12
commands:
- func: run server
vars:
TOPOLOGY: replica_set
TOOLCHAIN_VERSION: "3.12"
- func: run tests
vars:
TEST_NAME: mod_wsgi
SUB_TEST_NAME: standalone
TOOLCHAIN_VERSION: "3.12"
tags: [mod_wsgi, pr]
- name: mod-wsgi-embedded-mode-replica-set-python3.13
commands:
- func: run server
vars:
TOPOLOGY: replica_set
TOOLCHAIN_VERSION: "3.13"
- func: run tests
vars:
TEST_NAME: mod_wsgi
SUB_TEST_NAME: embedded
TOOLCHAIN_VERSION: "3.13"
tags: [mod_wsgi, pr]
- name: mod-wsgi-embedded-mode-replica-set-python3.14
commands:
- func: run server
vars:
TOPOLOGY: replica_set
TOOLCHAIN_VERSION: "3.14"
- func: run tests
vars:
TEST_NAME: mod_wsgi
SUB_TEST_NAME: embedded
TOOLCHAIN_VERSION: "3.14"
tags: [mod_wsgi, pr]

# No orchestration tests
- name: test-no-orchestration-python3.10-min-deps
commands:
Expand Down
10 changes: 0 additions & 10 deletions .evergreen/generated_configs/variants.yml
Original file line number Diff line number Diff line change
Expand Up @@ -361,16 +361,6 @@ buildvariants:
TEST_NAME: mockupdb
tags: [pr]

# Mod wsgi tests
- name: mod_wsgi-ubuntu-22
tasks:
- name: .mod_wsgi
display_name: Mod_WSGI Ubuntu-22
run_on:
- ubuntu2204-small
expansions:
MOD_WSGI_VERSION: "4"

# No c ext tests
- name: no-c-ext-rhel8
tasks:
Expand Down
33 changes: 0 additions & 33 deletions .evergreen/scripts/generate_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,14 +345,6 @@ def create_no_c_ext_variants():
return [create_variant(tasks, display_name, host=host, expansions=expansions)]


def create_mod_wsgi_variants():
host = HOSTS["ubuntu22"]
tasks = [".mod_wsgi"]
expansions = dict(MOD_WSGI_VERSION="4")
display_name = get_variant_name("Mod_WSGI", host)
return [create_variant(tasks, display_name, host=host, expansions=expansions)]


def create_disable_test_commands_variants():
host = DEFAULT_HOST
expansions = dict(AUTH="auth", SSL="ssl", DISABLE_TEST_COMMANDS="1")
Expand Down Expand Up @@ -957,31 +949,6 @@ def create_oidc_tasks():
return tasks


def create_mod_wsgi_tasks():
tasks = []
for (test, topology), python in zip_cycle(
product(["standalone", "embedded-mode"], ["standalone", "replica_set"]), CPYTHONS
):
if "t" in python:
continue
if test == "standalone":
task_name = "mod-wsgi-"
else:
task_name = "mod-wsgi-embedded-mode-"
task_name += topology.replace("_", "-")
task_name = get_task_name(task_name, python=python)
server_vars = dict(TOPOLOGY=topology, TOOLCHAIN_VERSION=python)
server_func = FunctionCall(func="run server", vars=server_vars)
vars = dict(
TEST_NAME="mod_wsgi", SUB_TEST_NAME=test.split("-")[0], TOOLCHAIN_VERSION=python
)
test_func = FunctionCall(func="run tests", vars=vars)
tags = ["mod_wsgi", "pr"]
commands = [server_func, test_func]
tasks.append(EvgTask(name=task_name, tags=tags, commands=commands))
return tasks


def _create_ocsp_tasks(algo, variant, server_type, base_task_name):
tasks = []
file_name = f"{algo}-basic-tls-ocsp-{variant}.json"
Expand Down
4 changes: 3 additions & 1 deletion .evergreen/scripts/mod_wsgi_tester.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,4 +90,6 @@ def teardown_mod_wsgi() -> None:


if __name__ == "__main__":
setup_mod_wsgi()
if len(sys.argv) != 2 or sys.argv[1] not in ("standalone", "embedded"):
raise SystemExit("Usage: python mod_wsgi_tester.py <standalone|embedded>")
setup_mod_wsgi(sys.argv[1])
23 changes: 17 additions & 6 deletions test/mod_wsgi_test/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,21 @@ The script also encodes and decodes all BSON types to ensure that
multiple sub interpreters in the same process are supported. This tests
the workaround added in `PYTHON-569 <https://jira.mongodb.org/browse/PYTHON-569>`_.

Automation
----------
Manual testing
--------------

At MongoDB, Inc. we use a continuous integration job that tests each
combination in the matrix. The job starts up Apache, starts a single server
or replica set, and runs ``test_client.py`` with the proper arguments.
See `run-mod-wsgi-tests.sh <https://github.com/mongodb/mongo-python-driver/blob/master/.evergreen/scripts/run-mod-wsgi-tests.sh>`_
The Evergreen configuration no longer runs these tests automatically. They
can only be run from an Evergreen Linux host that has the Python toolchain::

just run-server # or: TOPOLOGY=replica_set just run-server
just setup-tests mod_wsgi standalone # or: just setup-tests mod_wsgi embedded
just run-tests
just teardown-tests

Run ``just teardown-tests`` even if the tests fail: it stops the Apache
instance started by the setup step, which ``just run-tests`` leaves running.

The `mod_wsgi_tester.py <https://github.com/mongodb/mongo-python-driver/blob/main/.evergreen/scripts/mod_wsgi_tester.py>`_
helper performs the Apache setup, test, and teardown steps that the ``just``
commands dispatch to. It does not start MongoDB; use ``just run-server`` for
that.
Loading