Skip to content

Commit

Permalink
Used mustCreateCfgFile
Browse files Browse the repository at this point in the history
Signed-off-by: Omer Aplatony <[email protected]>
  • Loading branch information
omerap12 committed Jan 8, 2025
1 parent a5e8b66 commit 9448afd
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions server/etcdmain/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -790,17 +790,9 @@ enable-distributed-tracing: true
cfg := newConfig()

if tc.yamlConfig != "" {
tmpfile, err := os.CreateTemp("", "etcd-test-*.yaml")
if err != nil {
t.Fatal(err)
}
tmpfile := mustCreateCfgFile(t, []byte(tc.yamlConfig))
defer os.Remove(tmpfile.Name())

err = os.WriteFile(tmpfile.Name(), []byte(tc.yamlConfig), 0600)
if err != nil {
t.Fatal(err)
}

tc.args = []string{"--config-file=" + tmpfile.Name()}
}

Expand Down

0 comments on commit 9448afd

Please sign in to comment.