mirror of
https://github.com/caddyserver/caddy.git
synced 2025-08-07 09:04:04 -04:00
resolve failure on tempdir cleanup
Signed-off-by: Mohammed Al Sahaf <msaa1990@gmail.com>
This commit is contained in:
parent
3bcfeee97a
commit
b892bd2acf
@ -345,6 +345,12 @@ func TestNetWriter_WALPersistence(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Fatalf("Failed to open writer: %v", err)
|
||||
}
|
||||
// close on the cleanup to allow the `*testing.T` to remove the temp dir
|
||||
t.Cleanup(func() {
|
||||
if err := writer1.Close(); err != nil {
|
||||
t.Logf("Error closing writer1: %v", err)
|
||||
}
|
||||
})
|
||||
|
||||
firstMessages := []string{
|
||||
"Persistent message 1\n",
|
||||
|
Loading…
x
Reference in New Issue
Block a user