diff --git a/server/etcdmain/config_test.go b/server/etcdmain/config_test.go index 7faefef60ad..1a15e20c0ae 100644 --- a/server/etcdmain/config_test.go +++ b/server/etcdmain/config_test.go @@ -796,7 +796,8 @@ enable-distributed-tracing: true } defer os.Remove(tmpfile.Name()) - if err := os.WriteFile(tmpfile.Name(), []byte(tc.yamlConfig), 0600); err != nil { + err = os.WriteFile(tmpfile.Name(), []byte(tc.yamlConfig), 0600) + if err != nil { t.Fatal(err) }