diff --git a/server/etcdmain/config_test.go b/server/etcdmain/config_test.go index 749953e5dad..dd46f294931 100644 --- a/server/etcdmain/config_test.go +++ b/server/etcdmain/config_test.go @@ -25,9 +25,9 @@ import ( "testing" "time" + "github.com/stretchr/testify/assert" "sigs.k8s.io/yaml" - "github.com/stretchr/testify/assert" "go.etcd.io/etcd/pkg/v3/featuregate" "go.etcd.io/etcd/pkg/v3/flags" "go.etcd.io/etcd/server/v3/embed" @@ -727,12 +727,15 @@ func TestConfigFileDeprecatedOptions(t *testing.T) { } // Compare sets of flags - assert.Equal(t, tc.expectedFlags, foundFlags, "deprecated flags mismatch") + assert.Equalf(t, tc.expectedFlags, foundFlags, "deprecated flags mismatch - expected: %v, got: %v", + tc.expectedFlags, foundFlags) // Note: experimental-warning-unary-request-duration deprecation is handled // through a separate mechanism in embed.Config if tc.configFileYAML.ExperimentalWarningUnaryRequestDuration != 0 { - // Skip checking this flag as it's handled differently + assert.Equal(t, cfg.ec.WarningUnaryRequestDuration, + tc.configFileYAML.ExperimentalWarningUnaryRequestDuration, + "experimental warning duration should match") } }) }