feat: add template max_ttl (#6114)

Co-authored-by: Bruno Quaresma <bruno@coder.com>
This commit is contained in:
Dean Sheather
2023-03-07 14:14:58 +00:00
committed by GitHub
co-authored by Bruno Quaresma
parent 248c53d68d
commit 66a6b590a1
71 changed files with 2090 additions and 398 deletions
+2 -2
View File
@@ -17,11 +17,11 @@ import (
"github.com/coder/coder/agent"
"github.com/coder/coder/coderd/audit"
"github.com/coder/coder/coderd/autobuild/schedule"
"github.com/coder/coder/coderd/coderdtest"
"github.com/coder/coder/coderd/database"
"github.com/coder/coder/coderd/parameter"
"github.com/coder/coder/coderd/rbac"
"github.com/coder/coder/coderd/schedule"
"github.com/coder/coder/coderd/util/ptr"
"github.com/coder/coder/codersdk"
"github.com/coder/coder/codersdk/agentsdk"
@@ -331,7 +331,7 @@ func TestPostWorkspacesByOrganization(t *testing.T) {
})
// TTL should be set by the template
require.Equal(t, template.DefaultTTLMillis, templateTTL)
require.Equal(t, template.DefaultTTLMillis, template.DefaultTTLMillis, workspace.TTLMillis)
require.Equal(t, template.DefaultTTLMillis, *workspace.TTLMillis)
})
t.Run("InvalidTTL", func(t *testing.T) {