mirror of
https://github.com/Alvin-Zilverstand/nginx-proxy-manager.git
synced 2026-11-25 15:43:14 +01:00
Add goleak in unit tests
This commit is contained in:
41 files changed
+371
-8
No files matched your search
@@ -4,9 +4,13 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/assert"
|
||||
"go.uber.org/goleak"
|
||||
)
|
||||
|
||||
func TestCleanupWhitespace(t *testing.T) {
|
||||
// goleak is used to detect goroutine leaks
|
||||
defer goleak.VerifyNone(t, goleak.IgnoreAnyFunction("database/sql.(*DB).connectionOpener"))
|
||||
|
||||
tests := []struct {
|
||||
name string
|
||||
input string
|
||||
@@ -51,6 +55,9 @@ upstream npm_upstream_5 {
|
||||
}
|
||||
|
||||
func TestPrettyPrintJSON(t *testing.T) {
|
||||
// goleak is used to detect goroutine leaks
|
||||
defer goleak.VerifyNone(t, goleak.IgnoreAnyFunction("database/sql.(*DB).connectionOpener"))
|
||||
|
||||
testCases := []struct {
|
||||
input string
|
||||
expected string
|
||||
|
||||
Reference in new issue
Block a user