Skip to content

Commit

Permalink
Force setting pre-vote flag even if it uses default value.
Browse files Browse the repository at this point in the history
Signed-off-by: Joshua Zhang <[email protected]>
  • Loading branch information
joshuazh-x committed Feb 20, 2024
1 parent 11ff264 commit 1bb6fe8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/framework/e2e/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -571,6 +571,9 @@ func (cfg *EtcdProcessClusterConfig) EtcdServerProcessConfig(tb testing.TB, i in
}

defaultValues := values(*embed.NewConfig())
// The default pre-vote config in previous versions may not equal to that in current version.
// Clear prevote's default value so cluster always add pre-vote flag even if it uses default value.
defaultValues["pre-vote"] = ""
overrideValues := values(cfg.ServerConfig)
for flag, value := range overrideValues {
if defaultValue := defaultValues[flag]; value == "" || value == defaultValue {
Expand Down

0 comments on commit 1bb6fe8

Please sign in to comment.