Skip to content

Commit

Permalink
test: fix TestConfigFileDeprecatedOptions
Browse files Browse the repository at this point in the history
Use minimal config struct for YAML marshaling.
Replace custom mapToSortedSlice with standard library functions.
Fix flag verification for deprecated experimental options.

Fixes etcd-io#19066

Signed-off-by: mansoora <[email protected]>
  • Loading branch information
mansoor17syed committed Jan 13, 2025
1 parent 1aa7863 commit df09737
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions server/etcdmain/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -733,9 +733,11 @@ func TestConfigFileDeprecatedOptions(t *testing.T) {
// Note: experimental-warning-unary-request-duration deprecation is handled
// through a separate mechanism in embed.Config
if tc.configFileYAML.ExperimentalWarningUnaryRequestDuration != 0 {
assert.Equal(t, cfg.ec.WarningUnaryRequestDuration,
assert.Equalf(t, cfg.ec.WarningUnaryRequestDuration,
tc.configFileYAML.ExperimentalWarningUnaryRequestDuration,
"experimental warning duration should match")
"experimental warning duration mismatch - expected: %v, got: %v",
tc.configFileYAML.ExperimentalWarningUnaryRequestDuration,
cfg.ec.WarningUnaryRequestDuration)
}
})
}
Expand Down

0 comments on commit df09737

Please sign in to comment.