chore: Force license uuids to not be null (#6012)

* chore: Force license uuids to not be null

* All unit tests generate uuids for licenses

* Update migration files to new numbers

* Put migration in transaction
This commit is contained in:
Steven Masley
2023-02-13 18:21:58 -06:00
committed by GitHub
parent a54de6093b
commit 733f58c76d
11 changed files with 39 additions and 25 deletions

View File

@ -11,6 +11,7 @@ import (
"time"
"github.com/golang-jwt/jwt/v4"
"github.com/google/uuid"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
@ -128,6 +129,7 @@ func GenerateLicense(t *testing.T, options LicenseOptions) string {
c := &license.Claims{
RegisteredClaims: jwt.RegisteredClaims{
ID: uuid.NewString(),
Issuer: "test@testing.test",
ExpiresAt: jwt.NewNumericDate(options.ExpiresAt),
NotBefore: jwt.NewNumericDate(time.Now().Add(-time.Minute)),