refactor: deduplicate / type license feature code (#5734)

This commit is contained in:
Ammar Bandukwala
2023-01-17 17:04:29 -06:00
committed by GitHub
parent ea1b03f7c9
commit 501cfa9e8d
39 changed files with 648 additions and 396 deletions
+4 -1
View File
@@ -12,6 +12,7 @@ import (
"github.com/coder/coder/coderd/util/ptr"
"github.com/coder/coder/codersdk"
"github.com/coder/coder/enterprise/coderd/coderdenttest"
"github.com/coder/coder/enterprise/coderd/license"
"github.com/coder/coder/testutil"
)
@@ -26,7 +27,9 @@ func TestCreateWorkspace(t *testing.T) {
client := coderdenttest.New(t, nil)
user := coderdtest.CreateFirstUser(t, client)
_ = coderdenttest.AddLicense(t, client, coderdenttest.LicenseOptions{
TemplateRBAC: true,
Features: license.Features{
codersdk.FeatureTemplateRBAC: 1,
},
})
version := coderdtest.CreateTemplateVersion(t, client, user.OrganizationID, nil)