test: add t.Helper() calls to test helper functions (#7351)

This commit is contained in:
Ville Vesilehto
2025-06-05 00:36:04 +03:00
committed by GitHub
parent b4abdcacf0
commit 9f9aed31cf
30 changed files with 52 additions and 13 deletions

View File

@@ -21,6 +21,7 @@ func TempFile(dir, content string) (string, func(), error) {
// WritePEMFiles creates a tmp dir with ca.pem, cert.pem, and key.pem
func WritePEMFiles(t *testing.T) (string, error) {
t.Helper()
tempDir := t.TempDir()
data := `-----BEGIN CERTIFICATE-----

View File

@@ -1,6 +1,8 @@
package test
import "testing"
import (
"testing"
)
func TestTempFile(t *testing.T) {
_, f, e := TempFile(".", "test")