git.iko.soy/typeable/oauth2-proxy
on master help sign in
pkg/http/server_test.go: Add gleak to find goroutine leaks

Signed-off-by: Josef Johansson <josef86@gmail.com>

commitbb6aba4a00f157988216c2f2d52129da30e321de authorJosef Johansson <josef@oderland.se> dateSun 3 Mar 2024, 20:07 (3 years ago) parent3b11a51
1 file changed+3
pkg/http/server_test.go+3
pkg/http/server_test.go+3
@@ -12,6 +12,7 @@ import (
1212 . "github.com/onsi/ginkgo"
1313 . "github.com/onsi/ginkgo/extensions/table"
1414 . "github.com/onsi/gomega"
15+ . "github.com/onsi/gomega/gleak"
1516)
1617
1718const hello = "Hello World!"
@@ -559,6 +560,8 @@ var _ = Describe("Server", func() {
559560
560561 AfterEach(func() {
561562 cancel()
563+ Eventually(Goroutines).ShouldNot(HaveLeaked())
564+
562565 })
563566
564567 Context("with an ipv4 http server", func() {