fix: address /home/stevan/go/bin/golangci-lint run ./... issues
This commit is contained in:
@@ -13,9 +13,16 @@ func TestJwtCreationAndValidation(t *testing.T) {
|
||||
secret := []byte("RTCK2UTcOUkiswdrClC6Z3KmmEq/+QicpD9iRx7J0qY=")
|
||||
|
||||
jwtString, err := auth.MakeJWT(userId, secret, time.Hour)
|
||||
if err != nil {
|
||||
t.Fatalf("failed to create JWT: %v", err)
|
||||
}
|
||||
|
||||
validatedUserId, err := auth.ValidateJWT(jwtString, secret)
|
||||
if err != nil {
|
||||
t.Fatalf("failed to validate JWT: %v", err)
|
||||
}
|
||||
|
||||
if userId != validatedUserId {
|
||||
t.Fatalf("received %s expected %s: %v", validatedUserId, userId, err)
|
||||
t.Fatalf("received %s expected %s", validatedUserId, userId)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user