8000 yay!! u work!! · coder/coder@40d59d4 · GitHub
[go: up one dir, main page]

Skip to content

Commit 40d59d4

Browse files
committed
yay!! u work!!
1 parent 05529e0 commit 40d59d4

File tree

4 files changed

+11
-5
lines changed

4 files changed

+11
-5
lines changed

coderd/parameters_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ func TestDynamicParametersOwnerGroups(t *testing.T) {
5353

5454
// Should automatically send a form state with all defaulted/empty values
5555
preview := testutil.RequireRecvCtx(ctx, t, previews)
56+
require.Equal(t, -1, preview.ID)
5657
require.Empty(t, preview.Diagnostics)
5758
require.Equal(t, "group", preview.Parameters[0].Name)
5859
require.True(t, preview.Parameters[0].Value.Valid())
@@ -125,6 +126,7 @@ func TestDynamicParametersOwnerSSHPublicKey(t *testing.T) {
125126

126127
// Should automatically send a form state with all defaulted/empty values
127128
preview := testutil.RequireRecvCtx(ctx, t, previews)
129+
require.Equal(t, -1, preview.ID)
128130
require.Empty(t, preview.Diagnostics)
129131
require.Equal(t, "public_key", preview.Parameters[0].Name)
130132
require.True(t, preview.Parameters[0].Value.Valid())

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@ require (
488488
)
489489

490490
require (
491-
github.com/coder/preview v0.0.0-20250414151353-b379cc571023
491+
github.com/coder/preview v0.0.0-20250415184318-1998a47f687e
492492
github.com/kylecarbs/aisdk-go v0.0.5
493493
github.com/mark3labs/mcp-go v0.17.0
494494
)

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -907,8 +907,8 @@ github.com/coder/pq v1.10.5-0.20240813183442-0c420cb5a048 h1:3jzYUlGH7ZELIH4XggX
907907
github.com/coder/pq v1.10.5-0.20240813183442-0c420cb5a048/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
908908
github.com/coder/pretty v0.0.0-20230908205945-e89ba86370e0 h1:3A0ES21Ke+FxEM8CXx9n47SZOKOpgSE1bbJzlE4qPVs=
909909
github.com/coder/pretty v0.0.0-20230908205945-e89ba86370e0/go.mod h1:5UuS2Ts+nTToAMeOjNlnHFkPahrtDkmpydBen/3wgZc=
910-
github.com/coder/preview v0.0.0-20250414151353-b379cc571023 h1:uPar3rwfHoqqOUPyF8KVh1Qf76VcXU0oBpxNqsPujPE=
911-
github.com/coder/preview v0.0.0-20250414151353-b379cc571023/go.mod h1:HqHMj1omTQfg4Kg5mjvHgKrraFnww6S7MN2+4d6MDyg=
910+
github.com/coder/preview v0.0.0-20250415184318-1998a47f687e h1:qFeANfX24rGoGJwGqirYKD1QNp4EOWz2GpI81zdOjRY=
911+
github.com/coder/preview v0.0.0-20250415184318-1998a47f687e/go.mod h1:HqHMj1omTQfg4Kg5mjvHgKrraFnww6S7MN2+4d6MDyg=
912912
github.com/coder/quartz v0.1.2 h1:PVhc9sJimTdKd3VbygXtS4826EOCpB1fXoRlLnCrE+s=
913913
github.com/coder/quartz v0.1.2/go.mod h1:vsiCc+AHViMKH2CQpGIpFgdHIEQsxwm8yCscqKmzbRA=
914914
github.com/coder/retry v1.5.1 h1:iWu8YnD8YqHs3XwqrqsjoBTAVqT9ml6z9ViJ2wlMiqc=

testutil/ctx.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,17 @@ func Context(t *testing.T, dur time.Duration) context.Context {
1212
return ctx
1313
}
1414

15-
func RequireRecvCtx[A any](ctx context.Context, t testing.TB, c <-chan A) (a A) {
15+
func RequireRecvCtx[A any](ctx context.Context, t testing.TB, c <-chan A) A {
1616
t.Helper()
1717
select {
1818
case <-ctx.Done():
1919
t.Fatal("timeout")
20+
var a A
2021
return a
21-
case a = <-c:
22+
case a, ok := <-c:
23+
if !ok {
24+
t.Fatal("channel closed")
25+
}
2226
return a
2327
}
2428
}

0 commit comments

Comments
 (0)
0