From 523bab52fcd4f8a25fc37c27ae03d7117aea41a6 Mon Sep 17 00:00:00 2001 From: Clark Boylan Date: Mon, 1 Feb 2021 08:16:21 -0800 Subject: [PATCH] Check that git clone against x/ project succeeds in testing Previously the test was checking that stderr reported "Cloning into $PATH" which also happens in failure cases. We add an explicit check for a successful command return code to ensure that we aren't failing with that output. Change-Id: Iec51217f2cc97e6a56ff9d8b7a260650010f229f --- testinfra/test_gerrit.py | 1 + 1 file changed, 1 insertion(+) diff --git a/testinfra/test_gerrit.py b/testinfra/test_gerrit.py index 59ca0fdf2c..118ce93d4e 100644 --- a/testinfra/test_gerrit.py +++ b/testinfra/test_gerrit.py @@ -30,6 +30,7 @@ def test_gerrit_x_project_clone(host): cmd = host.run( 'git clone http://localhost:8081/x/test-project /tmp/test-project') assert "Cloning into '/tmp/test-project'..." in cmd.stderr + assert cmd.succeeded def test_gerrit_screenshot(host): driver = webdriver.Remote(