Skip to content

Commit

Permalink
Fix sonarcloud
Browse files Browse the repository at this point in the history
  • Loading branch information
Tit Petric committed Jul 22, 2023
1 parent 5c7e465 commit b236c7f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion gateway/mw_http_signature_validation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
"time"

"github.com/justinas/alice"
"github.com/stretchr/testify/assert"

"github.com/TykTechnologies/tyk/apidef"
"github.com/TykTechnologies/tyk/certs"
Expand Down Expand Up @@ -231,7 +232,8 @@ func testPrepareRSAAuthSessionPass(tb testing.TB, eventWG *sync.WaitGroup, priva
h.Write([]byte(signatureString))
hashed := h.Sum(nil)

signature, _ := rsa.SignPKCS1v15(cryptoRand.Reader, privateKey, crypto.SHA256, hashed)
signature, err := rsa.SignPKCS1v15(cryptoRand.Reader, privateKey, crypto.SHA256, hashed)
assert.NoError(t, err)

Check failure on line 236 in gateway/mw_http_signature_validation_test.go

View workflow job for this annotation

GitHub Actions / Go 1.19.x Redis 5

undefined: t

Check failure on line 236 in gateway/mw_http_signature_validation_test.go

View workflow job for this annotation

GitHub Actions / Go 1.19.x Redis 5

undeclared name: t

sigString := base64.StdEncoding.EncodeToString(signature)

Expand Down

0 comments on commit b236c7f

Please sign in to comment.