mirror of
https://gerrit.googlesource.com/git-repo
synced 2026-11-13 15:57:35 +00:00
Cover projects missing on the server (incl. `--fail-fast`), missing project & manifest revisions, and local changes that conflict with an incoming change. The tests check that repo exits non-zero with a useful error, leaves the rest of the tree usable, and recovers once the problem is fixed. Let `RepoClient.init` return failures instead of raising. Bug: 566270944 Change-Id: I84e2b8c0bb6012678add77360b446d4bea010c78 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/648548 Reviewed-by: Gavin Mak <gavinmak@google.com> Tested-by: Brian Gan <brgan@google.com> Commit-Queue: Brian Gan <brgan@google.com>
1.2 KiB
1.2 KiB
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.