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
This commit is contained in:
David Pursehouse
2018-06-19 22:36:24 +09:00
parent bb3677476d
commit 44c5d542b5

View File

@@ -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);
}