From 44c5d542b58b8bdfd394db599facfc33fc1e9863 Mon Sep 17 00:00:00 2001 From: David Pursehouse Date: Tue, 19 Jun 2018 22:36:24 +0900 Subject: [PATCH] AbstractIndexTests: Use correct command to index project The correct command is "project", singular, not "projects" plural. Fix this, and add assertions on the SSH command status which would have caught this mistake earlier. The test still needs further investigation, since it was passing despite the project not actually being indexed (due to the wrong command that was fixed here). Change-Id: I24c1492fc74d5412e8a488d73456a9f541c45440 --- .../com/google/gerrit/acceptance/ssh/AbstractIndexTests.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gerrit-acceptance-tests/src/test/java/com/google/gerrit/acceptance/ssh/AbstractIndexTests.java b/gerrit-acceptance-tests/src/test/java/com/google/gerrit/acceptance/ssh/AbstractIndexTests.java index 9b5a503a21..1097ce2b9a 100644 --- a/gerrit-acceptance-tests/src/test/java/com/google/gerrit/acceptance/ssh/AbstractIndexTests.java +++ b/gerrit-acceptance-tests/src/test/java/com/google/gerrit/acceptance/ssh/AbstractIndexTests.java @@ -49,6 +49,7 @@ public abstract class AbstractIndexTests extends AbstractDaemonTest { String cmd = Joiner.on(" ").join("gerrit", "index", "changes", changeLegacyId); adminSshSession.exec(cmd); + adminSshSession.assertSuccess(); assertChangeQuery("message:second", change.getChange(), true); } @@ -66,8 +67,9 @@ public abstract class AbstractIndexTests extends AbstractDaemonTest { assertChangeQuery("message:second", change.getChange(), false); enableChangeIndexWrites(); - String cmd = Joiner.on(" ").join("gerrit", "index", "projects", project.get()); + String cmd = Joiner.on(" ").join("gerrit", "index", "project", project.get()); adminSshSession.exec(cmd); + adminSshSession.assertSuccess(); assertChangeQuery("message:second", change.getChange(), true); }