fix: skip bash tests on Windows (#19277)

Adds Windows compatibility to toolsdk tests

This PR adds Windows compatibility to the toolsdk tests by:

1. Adding build constraints to exclude bash_test.go from running on
Windows
2. Skipping the WorkspaceSSHExec test on Windows platforms with a clear
message

These changes ensure tests run properly across all supported platforms.

Related to https://github.com/coder/internal/issues/798

Signed-off-by: Thomas Kosiewski <tk@coder.com>
This commit is contained in:
Thomas Kosiewski
2025-08-11 11:43:25 +02:00
committed by GitHub
parent dadeab881b
commit b7e026682a
2 changed files with 23 additions and 0 deletions
+4
View File
@@ -4,6 +4,7 @@ import (
"context"
"encoding/json"
"os"
"runtime"
"sort"
"sync"
"testing"
@@ -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)