test: fix test linting

See forgejo/forgejo#5911
This commit is contained in:
Michael Kriese 2024-11-11 10:31:03 +01:00
parent 1e7b368ccf
commit c33cbae7cc
No known key found for this signature in database
GPG key ID: F8D7748549A5986A
11 changed files with 15 additions and 18 deletions

View file

@ -10,7 +10,6 @@ import (
"crypto/sha256"
"crypto/x509"
"encoding/pem"
"regexp"
"testing"
"github.com/stretchr/testify/assert"
@ -24,8 +23,8 @@ func TestKeygen(t *testing.T) {
assert.NotEmpty(t, priv)
assert.NotEmpty(t, pub)
assert.Regexp(t, regexp.MustCompile("^-----BEGIN RSA PRIVATE KEY-----.*"), priv)
assert.Regexp(t, regexp.MustCompile("^-----BEGIN PUBLIC KEY-----.*"), pub)
assert.Regexp(t, "^-----BEGIN RSA PRIVATE KEY-----.*", priv)
assert.Regexp(t, "^-----BEGIN PUBLIC KEY-----.*", pub)
}
func TestSignUsingKeys(t *testing.T) {