feat(site): increase TTL and max TTL validation to 30 days (#8258)

Co-authored-by: Dean Sheather <dean@deansheather.com>
This commit is contained in:
Josh Vawdrey
2023-07-19 23:43:10 +10:00
committed by GitHub
parent 4232a2eb96
commit 6318c4c09f
10 changed files with 47 additions and 23 deletions

View File

@ -1837,13 +1837,13 @@ func TestWorkspaceUpdateTTL(t *testing.T) {
},
{
name: "maximum ttl",
ttlMillis: ptr.Ref((24 * 7 * time.Hour).Milliseconds()),
ttlMillis: ptr.Ref((24 * 30 * time.Hour).Milliseconds()),
expectedError: "",
},
{
name: "above maximum ttl",
ttlMillis: ptr.Ref((24*7*time.Hour + time.Minute).Milliseconds()),
expectedError: "time until shutdown must be less than 7 days",
ttlMillis: ptr.Ref((24*30*time.Hour + time.Minute).Milliseconds()),
expectedError: "time until shutdown must be less than 30 days",
},
}