7 Commits

Author SHA1 Message Date
Tim Burke
b1de1c35f4 Fix flake8 issue
Change-Id: I9950da672d286de978e568d0fa6d2c350fd4ad7b
2024-01-29 09:09:47 -08:00
Jeremy Stanley
4c6ab44916 Upgrade testing to Gerrit 3.4.4
An addition has been proposed to leverage Gerrit's "Cc" feature, but
in order to test this we need a newer version of the server.

Newer Gerrit versions require HTTP basic auth instead of digest for
the REST API, so switch our tests to use that when uploading SSH
keys.

A newer JDK (11) is required, but this version should still be
available on our configured test platforms.

We update the test Gerrit server config to not try to send email. This
prevents annoying tracebacks from ending up in the Gerrit logs on test
failures.

We update test_cloned_repo and test_multiple_changes to look for strings
that newer Gerrit emits on successful push. Git review passes these
through to users and the tests look for them to determine if pushes were
successful.

Because of an SSH host key negotiation regression in 3.4.5, stick
with 3.4.4 for now:

https://bugs.chromium.org/p/gerrit/issues/detail?id=16215

Finally we remove skipsdist from tox.ini so that `which git-review` can
find git-review installed to the test venv. Tox v4 won't install the
project into the venv if skipsdist is set.

Change-Id: I540950b93356b1efbc34bca976bfb3134f47a599
2023-03-07 15:56:59 -08:00
Stephen Finucane
ddbd0ba1d9 trivial: Update to hacking 2.x
Fixes an issue we're seeing in the python3-based gate plus some other
random things.

Change-Id: I417c0a7669090ee3419c406024f6f3e3289b4c4b
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2020-01-16 15:12:58 +00:00
Darragh Bailey
7f69ada396 Enable color support based on tty and config
Use the git config command and provided options to have git detect
whether color support should be enabled or disabled. Additionally ensure
that git-review color support can be controlled separately via the
option 'color.review', while still falling back to 'color.ui' if the app
specific option is not defined.

This will ensure that when piping or redirecting the output that colour
output will be disabled unless color.review, or it's fallback color.ui,
is set to always.

Also by utilizing 'git config', the any config options specified on the
command line that change behaviour will be adhered to. e.g.

  git -c color.review=never review -l

Will always output without color enabled.

Change-Id: I8f83ed8623da88e87972109af956331704e15d38
Closes-Bug: #1097961
2014-11-26 20:35:09 +00:00
Yuriy Taraday
d3e2986fa1 Wrap exceptions that occur while running external process
This should help identify problem with timeouts.

Change-Id: I663b1ca3fe9a74ed0869fefdb16583951e3db6a5
2014-02-13 13:46:44 +04:00
Yuriy Taraday
9a7f8ad613 Make Gerrit port and dir selection deterministic
For every test number N run in process with PID, we take address
127.N.PID/256.PID%256 and let Gerrit listen on its default ports (29418
for SSH and 8080 for HTTP) on that address. We also name site dir with
the same address with "site-" prefix.

Thanks to Clark Boylan for this great idea.

Change-Id: I95b010e7a5b96c981614d5d3401efe861534806f
2014-02-13 11:46:13 +04:00
Dina Belova
e99aa8b16d Implement integration tests.
Provide intergation testing for the git-review utility. Requires
Gerrit war file (like 2.6.1-gerrit.war) in the .gerrit directory in
the git-review project (like git-review/.gerrit/2.6.1-gerrit.war).

Tests start local Gerrit and create test user and project there to
be used.

Closes-Bug: 1048724
Change-Id: I3242479dcbcf230085178004540992680f3f8e30
2013-08-15 21:08:08 +00:00