feat: add auto-locking/deleting workspace based on template config (#8240)

This commit is contained in:
Jon Ayers
2023-07-02 21:29:52 -05:00
committed by GitHub
parent 818c4a7f23
commit 4a9c8f407a
18 changed files with 726 additions and 70 deletions

View File

@ -112,6 +112,11 @@ type LicenseOptions struct {
Features license.Features
}
// AddFullLicense generates a license with all features enabled.
func AddFullLicense(t *testing.T, client *codersdk.Client) codersdk.License {
return AddLicense(t, client, LicenseOptions{AllFeatures: true})
}
// AddLicense generates a new license with the options provided and inserts it.
func AddLicense(t *testing.T, client *codersdk.Client, options LicenseOptions) codersdk.License {
l, err := client.AddLicense(context.Background(), codersdk.AddLicenseRequest{