Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions codersdk/toolsdk/bash_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package toolsdk_test

import (
"context"
"runtime"
"testing"

"github.com/stretchr/testify/require"
Expand All @@ -14,6 +15,9 @@ import (

func TestWorkspaceBash(t *testing.T) {
t.Parallel()
if runtime.GOOS == "windows" {
t.Skip("Skipping on Windows: Workspace MCP bash tools rely on a Unix-like shell (bash) and POSIX/SSH semantics. Use Linux/macOS or WSL for these tests.")
}

t.Run("ValidateArgs", func(t *testing.T) {
t.Parallel()
Expand Down Expand Up @@ -97,6 +101,9 @@ func TestWorkspaceBash(t *testing.T) {

func TestNormalizeWorkspaceInput(t *testing.T) {
t.Parallel()
if runtime.GOOS == "windows" {
t.Skip("Skipping on Windows: Workspace MCP bash tools rely on a Unix-like shell (bash) and POSIX/SSH semantics. Use Linux/macOS or WSL for these tests.")
}

testCases := []struct {
name string
Expand Down Expand Up @@ -151,6 +158,9 @@ func TestNormalizeWorkspaceInput(t *testing.T) {

func TestAllToolsIncludesBash(t *testing.T) {
t.Parallel()
if runtime.GOOS == "windows" {
t.Skip("Skipping on Windows: Workspace MCP bash tools rely on a Unix-like shell (bash) and POSIX/SSH semantics. Use Linux/macOS or WSL for these tests.")
}

// Verify that WorkspaceBash is included in the All slice
found := false
Expand All @@ -169,6 +179,9 @@ func TestAllToolsIncludesBash(t *testing.T) {

func TestWorkspaceBashTimeout(t *testing.T) {
t.Parallel()
if runtime.GOOS == "windows" {
t.Skip("Skipping on Windows: Workspace MCP bash tools rely on a Unix-like shell (bash) and POSIX/SSH semantics. Use Linux/macOS or WSL for these tests.")
}

t.Run("TimeoutDefaultValue", func(t *testing.T) {
t.Parallel()
Expand Down Expand Up @@ -251,6 +264,9 @@ func TestWorkspaceBashTimeout(t *testing.T) {

func TestWorkspaceBashTimeoutIntegration(t *testing.T) {
t.Parallel()
if runtime.GOOS == "windows" {
t.Skip("Skipping on Windows: Workspace MCP bash tools rely on a Unix-like shell (bash) and POSIX/SSH semantics. Use Linux/macOS or WSL for these tests.")
}

t.Run("ActualTimeoutBehavior", func(t *testing.T) {
t.Parallel()
Expand Down Expand Up @@ -338,6 +354,9 @@ func TestWorkspaceBashTimeoutIntegration(t *testing.T) {

func TestWorkspaceBashBackgroundIntegration(t *testing.T) {
t.Parallel()
if runtime.GOOS == "windows" {
t.Skip("Skipping on Windows: Workspace MCP bash tools rely on a Unix-like shell (bash) and POSIX/SSH semantics. Use Linux/macOS or WSL for these tests.")
}

t.Run("BackgroundCommandCapturesOutput", func(t *testing.T) {
t.Parallel()
Expand Down
4 changes: 4 additions & 0 deletions codersdk/toolsdk/toolsdk_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"context"
"encoding/json"
"os"
"runtime"
"sort"
"sync"
"testing"
Expand Down Expand Up @@ -397,6 +398,9 @@ func TestTools(t *testing.T) {
})

t.Run("WorkspaceSSHExec", func(t *testing.T) {
if runtime.GOOS == "windows" {
t.Skip("WorkspaceSSHExec is not supported on Windows")
}
// Setup workspace exactly like main SSH tests
client, workspace, agentToken := setupWorkspaceForAgent(t)

Expand Down
Loading