Skip to content

Commit

Permalink
Added closing of test server in forward tests
Browse files Browse the repository at this point in the history
Signed-off-by: Corbin Phelps <[email protected]>
  • Loading branch information
Corbin Phelps committed Feb 15, 2022
1 parent 09d20a0 commit 7a25f65
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions operator/builtin/output/forward/forward_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ func TestForwardOutput(t *testing.T) {
body, _ := ioutil.ReadAll(req.Body)
received <- body
}))
defer srv.Close()

cfg := NewForwardOutputConfig("test")
memoryCfg := buffer.NewMemoryBufferConfig()
Expand Down Expand Up @@ -67,6 +68,7 @@ func TestFlushBufferOnClose(t *testing.T) {
body, _ := ioutil.ReadAll(req.Body)
received <- body
}))
defer srv.Close()

cfg.Address = srv.URL
ops, err := cfg.Build((testutil.NewBuildContext(t)))
Expand Down

0 comments on commit 7a25f65

Please sign in to comment.