Skip to content

Commit

Permalink
backport of commit abb2203
Browse files Browse the repository at this point in the history
  • Loading branch information
jmurret committed Mar 19, 2023
1 parent b0a7424 commit 4efaa2f
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions test/integration/consul-container/libs/cluster/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,11 +213,18 @@ func NewConfigBuilder(ctx *BuildContext) *Builder {
b.conf.Set("acl.default_policy", "deny")
b.conf.Set("acl.enable_token_persistence", true)
}

ls := string(ctx.logStore)
if ls != string(LogStore_WAL) && ls != string(LogStore_BoltDB) {
ls = string(LogStore_BoltDB)
if ls != "" && (ctx.consulVersion == "local" ||
semver.Compare("v"+ctx.consulVersion, "v1.15.0") >= 0) {
// Enable logstore backend for version after v1.15.0
if ls != string(LogStore_WAL) && ls != string(LogStore_BoltDB) {
ls = string(LogStore_BoltDB)
}
b.conf.Set("raft_logstore.backend", ls)
} else {
b.conf.Unset("raft_logstore.backend")
}
b.conf.Set("raft_logstore.backend", ls)

return b
}
Expand Down

0 comments on commit 4efaa2f

Please sign in to comment.