all: use errors.New() which has no param instead of fmt.Errorf()

This commit is contained in:
yzb@example.cn 2024-03-02 15:57:34 +08:00 committed by yasyzb
parent f0ea96f2e4
commit f62d3e0d0f
No known key found for this signature in database
GPG key ID: EB61E18B54E78C76
3 changed files with 14 additions and 11 deletions

View file

@ -7,6 +7,7 @@ package vault_auth_tee
import (
"context"
"crypto/tls"
"errors"
"fmt"
"io"
"testing"
@ -189,7 +190,7 @@ func testAccStepTEE(_ *testing.T, name string, types string, mrSigner string, mr
Data: data,
Check: func(resp *logical.Response) error {
if resp == nil && expectError {
return fmt.Errorf("expected error but received nil")
return errors.New("expected error but received nil")
}
return nil
},