mirror of
https://gerrit.googlesource.com/git-repo
synced 2026-11-12 15:31:15 +00:00
Cover `--reference` from a local mirror (with & without `--dissociate`), `--standalone-manifest` with a manifest file served over HTTP, and `--manifest-depth`. Teach the server to serve static files (`GitHost.publish_file`), let `manifest_xml` take an absolute `fetch` URL, and add `move_aside` to make git dirs disappear mid-test (deleting them fails on Windows). Bug: 566270944 Change-Id: Id60a19613a627f76d8d9125570dd5ce0cdfff9aa Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/648549 Reviewed-by: Gavin Mak <gavinmak@google.com> Tested-by: Brian Gan <brgan@google.com> Commit-Queue: Brian Gan <brgan@google.com>
Repo End-to-End Tests
These tests run the real repo launcher & code (as subprocesses) against a
local git smart HTTP server. They are hermetic: everything is served from
127.0.0.1 out of temporary directories, and the user's git config &
environment are ignored.
They run as part of ./run_tests by default, after the unit tests.
Running
# Everything (unit + e2e).
./run_tests
# Only the e2e tests.
./run_tests -m e2e
# Everything but the e2e tests.
./run_tests -m 'not e2e'
The suite is skipped automatically when git http-backend isn't
available, when git is older than 2.28 (need default branch support and
superproject support), or when not run from a git checkout.
Layout
harness.py: the git server, server-side repos & the repo client.test_init_sync.py: corerepo init&repo syncoptions.test_partial_clone.py: partial clones, incl. the standard Android configuration from go/repo-init & go/sync.test_sync_modes.py:sync -n/-l& the other sync flags.test_groups.py: manifest groups.test_failures.py: failure paths (missing projects, dirty trees, ...).test_workflows.py: multi-step workflows.test_manifest_regressions.py: manifests that broke users in the past.