From 50a74417f6d4f16393d7bb21f62e3235df275101 Mon Sep 17 00:00:00 2001 From: Jordan Bradford <36420801+jrdnbradford@users.noreply.github.com> Date: Sat, 27 Sep 2025 22:07:47 -0400 Subject: [PATCH 1/4] Update `run-test` args --- .github/integration-test.py | 35 +++++++++++++++++++++++++++++------ 1 file changed, 29 insertions(+), 6 deletions(-) diff --git a/.github/integration-test.py b/.github/integration-test.py index 0ceed6a6..4a4a6b1a 100755 --- a/.github/integration-test.py +++ b/.github/integration-test.py @@ -226,12 +226,35 @@ def main(): copy_parser.add_argument("src") copy_parser.add_argument("dest") - run_test_parser = subparsers.add_parser("run-test") - run_test_parser.add_argument("--installer-args", action="append") - run_test_parser.add_argument("--upgrade-from", default="") - run_test_parser.add_argument("--bootstrap-pip-spec", default="/srv/src") - run_test_parser.add_argument("container_name") - run_test_parser.add_argument("test_files", nargs="+") + run_test_parser = subparsers.add_parser( + "run-test", + help="Runs the bootstrap script in a container, then executes specified integration tests.", + ) + run_test_parser.add_argument( + "--installer-args", + action="append", + default=[], + help="Additional arguments to pass to bootstrap.py during the main installation. Can be used multiple times.", + ) + run_test_parser.add_argument( + "--upgrade-from", + default="", + help="A version/tag (e.g., 'main', 'v0.1.0') to install first, simulating an upgrade to the current source code.", + ) + run_test_parser.add_argument( + "--bootstrap-pip-spec", + default="/srv/src", + help="The pip specification used by the bootstrap script to install TLJH (for example: '--bootstrap-pip-spec=git+https://github.com/your-username/the-littlest-jupyterhub.git@branch-name'). Defaults to the local source code path.", + ) + run_test_parser.add_argument( + "container_name", + help="An identifier for the container/test run (for example: 'basic-tests').", + ) + run_test_parser.add_argument( + "test_files", + nargs="+", + help="A list of one or more test files under 'integration-tests/' to be executed.", + ) show_logs_parser = subparsers.add_parser("show-logs") show_logs_parser.add_argument("container_name") From 784e237831af427ca0ecd69409663458b64e6874 Mon Sep 17 00:00:00 2001 From: Jordan Bradford <36420801+jrdnbradford@users.noreply.github.com> Date: Sat, 27 Sep 2025 22:11:32 -0400 Subject: [PATCH 2/4] Update test docs --- docs/contributing/tests.md | 36 ++++++++++++++++++++++-------------- 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/docs/contributing/tests.md b/docs/contributing/tests.md index 3e8c1a71..1ad0d097 100644 --- a/docs/contributing/tests.md +++ b/docs/contributing/tests.md @@ -28,35 +28,43 @@ against the same installation of TLJH. ### Running integration tests locally -You need `docker` installed and callable by the user running -the integration tests without needing sudo. +You need `docker` or `podman` installed and callable by the user +running the integration tests without needing sudo. -You can then run the tests with: +First build the container with a Ubuntu-based image: ```bash -.github/integration-test.py run-test +.github/integration-test.py build-image \ + --build-arg "BASE_IMAGE=ubuntu:22.04" ``` -- `` is an identifier for the tests - you can choose anything you want -- `>` is list of test files (under `integration-tests`) that should be run in one go. +Then you can then run the tests with the `run-test` function. For usage run: + +```bash +.github/integration-test.py run-test --help +``` For example, to run all the basic tests, you would write: ```bash .github/integration-test.py run-test basic-tests \ - test_hub.py \ - test_proxy.py \ - test_install.py \ - test_extensions.py + test_hub.py \ + test_proxy.py \ + test_install.py \ + test_extensions.py ``` -This will run the tests in the three files against the same installation +This will run the tests in the four files against the same installation of TLJH and report errors. -If you would like to run the tests with a custom pip spec for the bootstrap script, you can use the `--bootstrap-pip-spec` +If you would like to run the tests with a custom `pip` spec for the bootstrap script, you can use the `--bootstrap-pip-spec` parameter: ```bash -.github/integration-test.py run-test \ - --bootstrap-pip-spec="git+https://github.com/your-username/the-littlest-jupyterhub.git@branch-name" +.github/integration-test.py run-test custom-pip-spec \ + test_hub.py \ + test_proxy.py \ + test_install.py \ + test_extensions.py \ + --bootstrap-pip-spec="git+https://github.com/your-username/the-littlest-jupyterhub.git@branch-name" ``` From 939c2b37fd30c8278c7c321933fc3fc67915df30 Mon Sep 17 00:00:00 2001 From: Jordan Bradford <36420801+jrdnbradford@users.noreply.github.com> Date: Mon, 29 Sep 2025 20:41:39 -0400 Subject: [PATCH 3/4] Fix mising link --- docs/contributing/code-review.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/contributing/code-review.md b/docs/contributing/code-review.md index 209cba69..afd72861 100644 --- a/docs/contributing/code-review.md +++ b/docs/contributing/code-review.md @@ -43,4 +43,4 @@ add more tests. If you are unsure what kind of tests to add for your pull request, other contributors to the repo will be happy to help guide you! -See [](/contributing/tests) for guidelines on writing tests. +See [`tests.md`](/docs/contributing/tests.md) for guidelines on writing tests. From fb1e1063d24127e9e839bc0924214b5417a3d974 Mon Sep 17 00:00:00 2001 From: Jordan Bradford <36420801+jrdnbradford@users.noreply.github.com> Date: Tue, 30 Sep 2025 23:01:03 -0400 Subject: [PATCH 4/4] Revert doc change --- docs/contributing/code-review.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/contributing/code-review.md b/docs/contributing/code-review.md index afd72861..209cba69 100644 --- a/docs/contributing/code-review.md +++ b/docs/contributing/code-review.md @@ -43,4 +43,4 @@ add more tests. If you are unsure what kind of tests to add for your pull request, other contributors to the repo will be happy to help guide you! -See [`tests.md`](/docs/contributing/tests.md) for guidelines on writing tests. +See [](/contributing/tests) for guidelines on writing tests.