Skip to content

Commit 0eedaf8

Browse files
fix(sandbox): handle structured command CI
1 parent 6665bd5 commit 0eedaf8

2 files changed

Lines changed: 9 additions & 2 deletions

File tree

internal/cmd/sandbox_test.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import (
66
"net/http"
77
"os"
88
"path/filepath"
9+
"runtime"
910
"testing"
1011

1112
langsmith "github.com/langchain-ai/langsmith-go"
@@ -204,10 +205,16 @@ func TestSandboxCustomOutputCommands_Flags(t *testing.T) {
204205
cmd *cobra.Command
205206
want []string
206207
}{
207-
{"console", newSandboxConsoleCmd(), []string{"shell", "forward-ssh-agent"}},
208208
{"tunnel", newSandboxTunnelCmd(), []string{"url", "name", "remote-port", "local-port", "stdio", "log-level"}},
209209
{"ssh-setup", newSandboxSSHSetupCmd(), []string{"identity"}},
210210
}
211+
if runtime.GOOS != "windows" {
212+
tests = append(tests, struct {
213+
name string
214+
cmd *cobra.Command
215+
want []string
216+
}{"console", newSandboxConsoleCmd(), []string{"shell", "forward-ssh-agent"}})
217+
}
211218
for _, tc := range tests {
212219
t.Run(tc.name, func(t *testing.T) {
213220
for _, name := range tc.want {

internal/cmd/sandbox_tunnel.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ Examples:
6565
return nil, fmt.Errorf("provide a sandbox name or --url")
6666
}
6767
client := MustGetClient()
68-
ctx, cancel := signal.NotifyContext(context.Background(), syscall.SIGTERM, syscall.SIGINT)
68+
ctx, cancel := signal.NotifyContext(ctx, syscall.SIGTERM, syscall.SIGINT)
6969
defer cancel()
7070
sandboxURL := in.SandboxURL
7171
if sandboxURL == "" {

0 commit comments

Comments
 (0)