Enable notedb tests for LabelTypeIT

Fix construction of labels in ChangeJson to use
ApprovalsUtil.byPatchSet where appropriate, to get appropriate label
copying and normalization behavior.

For now, keep the existing behavior of showing reviewers in the
detailed label output if they have ever voted on any patch set of the
change, even if they are not currently listed as a reviewer.

Change-Id: I1ea2b4110fb3eca41c9bb406e8ee11e1f60a8e69
This commit is contained in:
Dave Borowitz
2014-03-25 10:51:01 -07:00
parent 8e36bbdcd7
commit a06b46982b
4 changed files with 20 additions and 22 deletions

View File

@@ -14,8 +14,6 @@
package com.google.gerrit.server.notedb;
import static com.google.common.base.Preconditions.checkArgument;
import com.google.common.annotations.VisibleForTesting;
import com.google.gerrit.server.config.GerritServerConfig;
import com.google.inject.Inject;
@@ -36,7 +34,7 @@ public class NotesMigration {
static NotesMigration allEnabled() {
Config cfg = new Config();
cfg.setBoolean("notedb", null, "write", true);
//cfg.setBoolean("notedb", "patchSetApprovals", "read", true);
cfg.setBoolean("notedb", "patchSetApprovals", "read", true);
return new NotesMigration(cfg);
}
@@ -48,8 +46,6 @@ public class NotesMigration {
write = cfg.getBoolean("notedb", null, "write", false);
readPatchSetApprovals =
cfg.getBoolean("notedb", "patchSetApprovals", "read", false);
checkArgument(!readPatchSetApprovals,
"notedb.readPatchSetApprovals not yet supported");
}
public boolean write() {