mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
Implement Quotas v3 (#5012)
* provisioner/terraform: add cost to resource_metadata * provisionerd/runner: use Options struct * Complete provisionerd implementation * Add quota_allowance to groups * Combine Quota and RBAC licenses * Add Opts to InTx
This commit is contained in:
@@ -362,12 +362,6 @@ func newConfig() *codersdk.DeploymentConfig {
|
||||
Enterprise: true,
|
||||
Secret: true,
|
||||
},
|
||||
UserWorkspaceQuota: &codersdk.DeploymentConfigField[int]{
|
||||
Name: "User Workspace Quota",
|
||||
Usage: "Enables and sets a limit on how many workspaces each user can create.",
|
||||
Flag: "user-workspace-quota",
|
||||
Enterprise: true,
|
||||
},
|
||||
Provisioner: &codersdk.ProvisionerConfig{
|
||||
Daemons: &codersdk.DeploymentConfigField[int]{
|
||||
Name: "Provisioner Daemons",
|
||||
|
||||
@@ -79,16 +79,14 @@ func TestConfig(t *testing.T) {
|
||||
}, {
|
||||
Name: "Enterprise",
|
||||
Env: map[string]string{
|
||||
"CODER_AUDIT_LOGGING": "false",
|
||||
"CODER_BROWSER_ONLY": "true",
|
||||
"CODER_SCIM_API_KEY": "some-key",
|
||||
"CODER_USER_WORKSPACE_QUOTA": "10",
|
||||
"CODER_AUDIT_LOGGING": "false",
|
||||
"CODER_BROWSER_ONLY": "true",
|
||||
"CODER_SCIM_API_KEY": "some-key",
|
||||
},
|
||||
Valid: func(config *codersdk.DeploymentConfig) {
|
||||
require.Equal(t, config.AuditLogging.Value, false)
|
||||
require.Equal(t, config.BrowserOnly.Value, true)
|
||||
require.Equal(t, config.SCIMAPIKey.Value, "some-key")
|
||||
require.Equal(t, config.UserWorkspaceQuota.Value, 10)
|
||||
},
|
||||
}, {
|
||||
Name: "TLS",
|
||||
|
||||
Reference in New Issue
Block a user