File tree Expand file tree Collapse file tree 4 files changed +11
-5
lines changed Expand file tree Collapse file tree 4 files changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,7 @@ func TestDynamicParametersOwnerGroups(t *testing.T) {
53
53
54
54
// Should automatically send a form state with all defaulted/empty values
55
55
preview := testutil .RequireRecvCtx (ctx , t , previews )
56
+ require .Equal (t , - 1 , preview .ID )
56
57
require .Empty (t , preview .Diagnostics )
57
58
require .Equal (t , "group" , preview .Parameters [0 ].Name )
58
59
require .True (t , preview .Parameters [0 ].Value .Valid ())
@@ -125,6 +126,7 @@ func TestDynamicParametersOwnerSSHPublicKey(t *testing.T) {
125
126
126
127
// Should automatically send a form state with all defaulted/empty values
127
128
preview := testutil .RequireRecvCtx (ctx , t , previews )
129
+ require .Equal (t , - 1 , preview .ID )
128
130
require .Empty (t , preview .Diagnostics )
129
131
require .Equal (t , "public_key" , preview .Parameters [0 ].Name )
130
132
require .True (t , preview .Parameters [0 ].Value .Valid ())
Original file line number Diff line number Diff line change @@ -488,7 +488,7 @@ require (
488
488
)
489
489
490
490
require (
491
- github.com/coder/preview v0.0.0-20250414151353-b379cc571023
491
+ github.com/coder/preview v0.0.0-20250415184318-1998a47f687e
492
492
github.com/kylecarbs/aisdk-go v0.0.5
493
493
github.com/mark3labs/mcp-go v0.17.0
494
494
)
Original file line number Diff line number Diff line change @@ -907,8 +907,8 @@ github.com/coder/pq v1.10.5-0.20240813183442-0c420cb5a048 h1:3jzYUlGH7ZELIH4XggX
907
907
github.com/coder/pq v1.10.5-0.20240813183442-0c420cb5a048 /go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o =
908
908
github.com/coder/pretty v0.0.0-20230908205945-e89ba86370e0 h1:3A0ES21Ke+FxEM8CXx9n47SZOKOpgSE1bbJzlE4qPVs =
909
909
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 =
912
912
github.com/coder/quartz v0.1.2 h1:PVhc9sJimTdKd3VbygXtS4826EOCpB1fXoRlLnCrE+s =
913
913
github.com/coder/quartz v0.1.2 /go.mod h1:vsiCc+AHViMKH2CQpGIpFgdHIEQsxwm8yCscqKmzbRA =
914
914
github.com/coder/retry v1.5.1 h1:iWu8YnD8YqHs3XwqrqsjoBTAVqT9ml6z9ViJ2wlMiqc =
Original file line number Diff line number Diff line change @@ -12,13 +12,17 @@ func Context(t *testing.T, dur time.Duration) context.Context {
12
12
return ctx
13
13
}
14
14
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 {
16
16
t .Helper ()
17
17
select {
18
18
case <- ctx .Done ():
19
19
t .Fatal ("timeout" )
20
+ var a A
20
21
return a
21
- case a = <- c :
22
+ case a , ok := <- c :
23
+ if ! ok {
24
+ t .Fatal ("channel closed" )
25
+ }
22
26
return a
23
27
}
24
28
}
You can’t perform that action at this time.
0 commit comments