Add Service Banners (#5272)

This commit is contained in:
Ammar Bandukwala
2022-12-06 12:38:38 -06:00
committed by GitHub
parent df389d429c
commit 1cfe5de1c5
36 changed files with 959 additions and 4 deletions

View File

@ -113,6 +113,7 @@ type LicenseOptions struct {
HighAvailability bool
MultipleGitAuth bool
ExternalProvisionerDaemons bool
ServiceBanners bool
}
// AddLicense generates a new license with the options provided and inserts it.
@ -164,6 +165,11 @@ func GenerateLicense(t *testing.T, options LicenseOptions) string {
externalProvisionerDaemons = 1
}
serviceBanners := int64(0)
if options.ServiceBanners {
serviceBanners = 1
}
c := &license.Claims{
RegisteredClaims: jwt.RegisteredClaims{
Issuer: "test@testing.test",
@ -186,6 +192,7 @@ func GenerateLicense(t *testing.T, options LicenseOptions) string {
TemplateRBAC: rbacEnabled,
MultipleGitAuth: multipleGitAuth,
ExternalProvisionerDaemons: externalProvisionerDaemons,
ServiceBanners: serviceBanners,
},
}
tok := jwt.NewWithClaims(jwt.SigningMethodEdDSA, c)