diff --git a/.evergreen/generated_configs/tasks.yml b/.evergreen/generated_configs/tasks.yml index 94404d7828..f47c19ce1e 100644 --- a/.evergreen/generated_configs/tasks.yml +++ b/.evergreen/generated_configs/tasks.yml @@ -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: diff --git a/.evergreen/generated_configs/variants.yml b/.evergreen/generated_configs/variants.yml index 9fe505c562..35e19b221a 100644 --- a/.evergreen/generated_configs/variants.yml +++ b/.evergreen/generated_configs/variants.yml @@ -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: diff --git a/.evergreen/scripts/generate_config.py b/.evergreen/scripts/generate_config.py index e99cf23912..d1f4af4133 100644 --- a/.evergreen/scripts/generate_config.py +++ b/.evergreen/scripts/generate_config.py @@ -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") @@ -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" diff --git a/.evergreen/scripts/mod_wsgi_tester.py b/.evergreen/scripts/mod_wsgi_tester.py index 5968849068..2c33e50b78 100644 --- a/.evergreen/scripts/mod_wsgi_tester.py +++ b/.evergreen/scripts/mod_wsgi_tester.py @@ -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 ") + setup_mod_wsgi(sys.argv[1]) diff --git a/test/mod_wsgi_test/README.rst b/test/mod_wsgi_test/README.rst index e96db9406c..e212cd9265 100644 --- a/test/mod_wsgi_test/README.rst +++ b/test/mod_wsgi_test/README.rst @@ -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 `_. -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 `_ +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 `_ +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.