1
0
mirror of https://github.com/oauth2-proxy/oauth2-proxy.git synced 2025-02-19 19:44:16 +02:00

pkg/http/server_test.go: Add gleak to find goroutine leaks

Signed-off-by: Josef Johansson <josef86@gmail.com>
This commit is contained in:
Josef Johansson 2024-03-03 20:07:31 +01:00 committed by Josef Johansson
parent 3b11a51a70
commit bb6aba4a00

View File

@ -12,6 +12,7 @@ import (
. "github.com/onsi/ginkgo" . "github.com/onsi/ginkgo"
. "github.com/onsi/ginkgo/extensions/table" . "github.com/onsi/ginkgo/extensions/table"
. "github.com/onsi/gomega" . "github.com/onsi/gomega"
. "github.com/onsi/gomega/gleak"
) )
const hello = "Hello World!" const hello = "Hello World!"
@ -559,6 +560,8 @@ var _ = Describe("Server", func() {
AfterEach(func() { AfterEach(func() {
cancel() cancel()
Eventually(Goroutines).ShouldNot(HaveLeaked())
}) })
Context("with an ipv4 http server", func() { Context("with an ipv4 http server", func() {