git.iko.soy/typeable/oauth2-proxy
on master help sign in
pkg/http/server_test.go: Add gleak to find goroutine leaks
bb6aba4Josef Johansson
pkg/http/server_test.go+3
@@ -12,6 +12,7 @@ import (
12 . "github.com/onsi/ginkgo"
12 . "github.com/onsi/ginkgo"
13 . "github.com/onsi/ginkgo/extensions/table"
13 . "github.com/onsi/ginkgo/extensions/table"
14 . "github.com/onsi/gomega"
14 . "github.com/onsi/gomega"
15+ . "github.com/onsi/gomega/gleak"
15)
16)
16
17
17const hello = "Hello World!"
18const hello = "Hello World!"
@@ -559,6 +560,8 @@ var _ = Describe("Server", func() {
559
560
560 AfterEach(func() {
561 AfterEach(func() {
561 cancel()
562 cancel()
563+ Eventually(Goroutines).ShouldNot(HaveLeaked())
564+
562 })
565 })
563
566
564 Context("with an ipv4 http server", func() {
567 Context("with an ipv4 http server", func() {