You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This script automatically handles Docker container lifecycle, environment variables, and cleanup. Additional options:
548
551
549
-
- ``--mode also-local``: Include memory, pickle, and maxage tests alongside MongoDB tests
550
-
- ``--keep-running``: Keep MongoDB container running after tests
551
-
- ``--verbose``: Show verbose output
552
-
- ``--coverage-html``: Generate HTML coverage report
552
+
- ``-v, --verbose``: Show verbose output
553
+
- ``-k, --keep-running``: Keep containers running after tests
554
+
- ``-h, --html-coverage``: Generate HTML coverage report
553
555
554
556
**Option 2: Using Make**
555
557
556
558
.. code-block:: bash
557
559
558
-
make test-mongo-local # Run tests with Docker MongoDB
559
-
make test-mongo-inmemory # Run tests with in-memory MongoDB (default)
560
+
make test-mongo-local # Run MongoDB tests with Docker
561
+
make test-all-local # Run all backends with Docker
562
+
make test-mongo-inmemory # Run with in-memory MongoDB (default)
560
563
561
564
**Option 3: Manual setup**
562
565
@@ -578,6 +581,28 @@ Contributors are encouraged to test against a real MongoDB instance before submi
578
581
**HOWEVER, the tests run against a live MongoDB instance when you submit a PR are the determining tests for deciding whether your code functions correctly against MongoDB.**
579
582
580
583
584
+
Testing all backends locally
585
+
-----------------------------
586
+
587
+
To test all cachier backends (MongoDB, Redis, SQL, Memory, Pickle) locally with Docker:
588
+
589
+
.. code-block:: bash
590
+
591
+
# Test all backends at once
592
+
./scripts/test-local.sh all
593
+
594
+
# Test only external backends (MongoDB, Redis, SQL)
595
+
./scripts/test-local.sh external
596
+
597
+
# Test specific combinations
598
+
./scripts/test-local.sh mongo redis
599
+
600
+
# Keep containers running for debugging
601
+
./scripts/test-local.sh all -k
602
+
603
+
The unified test script automatically manages Docker containers, installs required dependencies, and runs the appropriate test suites. See ``scripts/README-local-testing.md`` for detailed documentation.
0 commit comments