Skip to content

Commit 18c7093

Browse files
committed
Linting + test
1 parent 7812a9d commit 18c7093

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

coderd/autobuild/lifecycle_executor_test.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ import (
2323
"github.com/coder/coder/v2/codersdk"
2424
"github.com/coder/coder/v2/provisioner/echo"
2525
"github.com/coder/coder/v2/provisionersdk/proto"
26+
"github.com/coder/coder/v2/testutil"
2627
)
2728

2829
func TestExecutorAutostartOK(t *testing.T) {
@@ -60,6 +61,12 @@ func TestExecutorAutostartOK(t *testing.T) {
6061

6162
workspace = coderdtest.MustWorkspace(t, client, workspace.ID)
6263
assert.Equal(t, codersdk.BuildReasonAutostart, workspace.LatestBuild.Reason)
64+
// Assert some template props. If this is not set correctly, the test
65+
// will fail.
66+
ctx := testutil.Context(t, testutil.WaitShort)
67+
template, err := client.Template(ctx, workspace.TemplateID)
68+
require.NoError(t, err)
69+
require.Equal(t, template.AutostartRequirement.DaysOfWeek, []string{"monday", "tuesday", "wednesday", "thursday", "friday", "saturday", "sunday"})
6370
}
6471

6572
func TestExecutorAutostartTemplateUpdated(t *testing.T) {

provisionersdk/proto/provisioner.pb.go

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)