Skip to content

Commit

Permalink
test(Test_NewServer): fix return err
Browse files Browse the repository at this point in the history
Signed-off-by: PoAn Yang <[email protected]>
  • Loading branch information
FrankYang0529 authored and bk201 committed Nov 3, 2023
1 parent 77f1114 commit 4085c62
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/server/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func Test_NewServer(t *testing.T) {
assert.NoError(err, "expected no error during creation of tmp dir")
go func() {
err = newServer(ctx, tmpDir)
assert.Contains(err.Error(), "context canceled", "error occured during shutdown") //only expected error is context canceled
assert.Contains(err.Error(), "http: Server closed", "error occured during shutdown") //only expected error is context canceled
}()
time.Sleep(1 * time.Second)
f, err := ioutil.TempFile(TempDir(), "sample")
Expand Down

0 comments on commit 4085c62

Please sign in to comment.