From 2f0f4745d7078f0e518c3fbe1772bb5c2acb6435 Mon Sep 17 00:00:00 2001 From: Sun Yimin Date: Fri, 16 Aug 2024 09:23:25 +0800 Subject: [PATCH] smx509: add t.Helper calls to test helpers --- smx509/x509_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/smx509/x509_test.go b/smx509/x509_test.go index c66f9a0..b22a8e3 100644 --- a/smx509/x509_test.go +++ b/smx509/x509_test.go @@ -1264,6 +1264,7 @@ func TestCreateCertificateRequest(t *testing.T) { } func marshalAndParseCSR(t *testing.T, template *x509.CertificateRequest) *CertificateRequest { + t.Helper() derBytes, err := CreateCertificateRequest(rand.Reader, template, testPrivateKey) if err != nil { t.Fatal(err) @@ -1428,6 +1429,7 @@ func TestCriticalFlagInCSRRequestedExtensions(t *testing.T) { // serialiseAndParse generates a self-signed certificate from template and // returns a parsed version of it. func serialiseAndParse(t *testing.T, template *x509.Certificate) *Certificate { + t.Helper() derBytes, err := CreateCertificate(rand.Reader, template, template, &testPrivateKey.PublicKey, testPrivateKey) if err != nil { t.Fatalf("failed to create certificate: %s", err)