summaryrefslogtreecommitdiffstats
path: root/tests/conftest.py
Commit message (Collapse)AuthorAgeFilesLines
* tests: setup user identity for testsVitalii Dmitriev2023-12-201-0/+9
| | | | | | | | | | | | | | | | | After a6413f5d a GitCommandError is raised. Since there were no user identity were set up, it fails: - ReviewableBranchTests from test_project.py - ResolveRepoRev and CheckRepoRev from test_wrapper.py Test: ./run_tests Change-Id: Id7f5772afe22c77fc4c8f8f0b8be1b627ed42187 Signed-off-by: Vitalii Dmitriev <vitalii.dmitriev@unikie.com> Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/398658 Reviewed-by: Mike Frysinger <vapier@google.com> Tested-by: Vitalii Dmitriev <dmit.vitalii@gmail.com> Commit-Queue: Vitalii Dmitriev <dmit.vitalii@gmail.com>
* tests: Set HOME to a temporary directory when running tests.v2.38Jason R. Coombs2023-10-171-0/+49
| | | | | | | | | | | | When running the tests in my environment, tests that derived from `test_wrapper.GitCheckoutTestCase` would fail on commit or tag due to incomplete or incorrect gpg config. Ideally, the tests should not be dependent on the user's git config. This change ensures $HOME (or Windows equivalent) is replaced for the session. Bug: 302797407 Change-Id: Ib42b712dd7b6602fee6e18329a8c6d52fb9458b9 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/388235 Tested-by: Jason R. Coombs <jaraco@google.com> Reviewed-by: Mike Frysinger <vapier@google.com> Commit-Queue: Jason R. Coombs <jaraco@google.com>
* Format codebase with black and check formatting in CQGavin Mak2023-03-221-2/+2
| | | | | | | | | | | | Apply rules set by https://gerrit-review.googlesource.com/c/git-repo/+/362954/ across the codebase and fix any lingering errors caught by flake8. Also check black formatting in run_tests (and CQ). Bug: b/267675342 Change-Id: I972d77649dac351150dcfeb1cd1ad0ea2efc1956 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/363474 Reviewed-by: Mike Frysinger <vapier@google.com> Tested-by: Gavin Mak <gavinmak@google.com> Commit-Queue: Gavin Mak <gavinmak@google.com>
* tests: clean up repo_trace._TRACE_FILE patchingMike Frysinger2022-12-081-0/+25
Patch this automatically for all tests rather than duplicating the boilerplate in diff testcases. Change-Id: I391d5c859974cda3d5680d34ede2ce6e9e925838 Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/354358 Reviewed-by: Joanna Wang <jojwang@google.com> Tested-by: Mike Frysinger <vapier@google.com>