its-* is enabled only if enabled flag is not false
We need to enable ITS integration for any condition different
than 'false' (enforced and true are valid values)
Change-Id: I86689fc803f62cce54201a720c80d0f6267fd4b2
diff --git a/src/main/java/com/googlesource/gerrit/plugins/its/base/its/ItsConfig.java b/src/main/java/com/googlesource/gerrit/plugins/its/base/its/ItsConfig.java
index 46fc817..581ef99 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/its/base/its/ItsConfig.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/its/base/its/ItsConfig.java
@@ -100,14 +100,14 @@
for (ProjectState parentState : projectState.treeInOrder()) {
PluginConfig parentCfg =
pluginCfgFactory.getFromProjectConfig(parentState, pluginName);
- if ("enforced".equals(parentCfg.getString("enabled"))
+ if (!"false".equals(parentCfg.getString("enabled"))
&& isEnabledForBranch(parentState, refName)) {
return true;
}
}
- return pluginCfgFactory.getFromProjectConfigWithInheritance(
- projectState, pluginName).getBoolean("enabled", false)
+ return !"false".equals(pluginCfgFactory.getFromProjectConfigWithInheritance(
+ projectState, pluginName).getString("enabled", "false"))
&& isEnabledForBranch(projectState, refName);
}