MCPcopy Index your code
hub / github.com/coder/coder / AddLicense

Function AddLicense

enterprise/coderd/coderdenttest/coderdenttest.go:256–262  ·  view source on GitHub ↗

AddLicense generates a new license with the options provided and inserts it.

(t *testing.T, client *codersdk.Client, options LicenseOptions)

Source from the content-addressed store, hash-verified

254
255// AddLicense generates a new license with the options provided and inserts it.
256func AddLicense(t *testing.T, client *codersdk.Client, options LicenseOptions) codersdk.License {
257 l, err := client.AddLicense(context.Background(), codersdk.AddLicenseRequest{
258 License: GenerateLicense(t, options),
259 })
260 require.NoError(t, err)
261 return l
262}
263
264// GenerateLicense returns a signed JWT using the test key.
265func GenerateLicense(t *testing.T, options LicenseOptions) string {

Callers 9

TestAnnouncementBannersFunction · 0.92
TestEntitlementsFunction · 0.92
TestDeleteGroupFunction · 0.92
TestPostLicenseFunction · 0.92
TestGetLicenseFunction · 0.92
TestDeleteLicenseFunction · 0.92
NewWithAPIFunction · 0.85
AddFullLicenseFunction · 0.85

Calls 2

GenerateLicenseFunction · 0.85
AddLicenseMethod · 0.80

Tested by 7

TestAnnouncementBannersFunction · 0.74
TestEntitlementsFunction · 0.74
TestDeleteGroupFunction · 0.74
TestPostLicenseFunction · 0.74
TestGetLicenseFunction · 0.74
TestDeleteLicenseFunction · 0.74