From 2d5ea98257bd6fc234eae231fd907fbb383c5c65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Di=C3=B3genes=20Fernandes?= Date: Wed, 17 Sep 2025 16:56:19 -0300 Subject: [PATCH] skip timeout lock tests on windows (#3288) Signed-off-by: Diogenes Fernandes --- internal/backend/remote/backend_apply_test.go | 9 +++++++-- internal/backend/remote/backend_plan_test.go | 5 +++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/internal/backend/remote/backend_apply_test.go b/internal/backend/remote/backend_apply_test.go index bf7c29c289..72a171439b 100644 --- a/internal/backend/remote/backend_apply_test.go +++ b/internal/backend/remote/backend_apply_test.go @@ -9,6 +9,7 @@ import ( "context" "os" "os/signal" + "runtime" "strings" "syscall" "testing" @@ -1091,6 +1092,10 @@ func TestRemote_applyWorkspaceWithoutOperations(t *testing.T) { } func TestRemote_applyLockTimeout(t *testing.T) { + if runtime.GOOS == "windows" { + t.Skip("lockTimeout is implemented using signals. Windows doesn't support sending signals, so we skip this test.") + } + b, bCleanup := testBackendDefault(t) defer bCleanup() @@ -1156,10 +1161,10 @@ func TestRemote_applyLockTimeout(t *testing.T) { t.Fatalf("expected lock timeout error in output: %s", output) } if strings.Contains(output, "1 to add, 0 to change, 0 to destroy") { - t.Fatalf("unexpected plan summery in output: %s", output) + t.Fatalf("unexpected plan summary in output: %s", output) } if strings.Contains(output, "1 added, 0 changed, 0 destroyed") { - t.Fatalf("unexpected apply summery in output: %s", output) + t.Fatalf("unexpected apply summary in output: %s", output) } } diff --git a/internal/backend/remote/backend_plan_test.go b/internal/backend/remote/backend_plan_test.go index bd44c9fe66..84eaf537aa 100644 --- a/internal/backend/remote/backend_plan_test.go +++ b/internal/backend/remote/backend_plan_test.go @@ -9,6 +9,7 @@ import ( "context" "os" "os/signal" + "runtime" "strings" "syscall" "testing" @@ -836,6 +837,10 @@ func TestRemote_planWorkspaceWithoutOperations(t *testing.T) { } func TestRemote_planLockTimeout(t *testing.T) { + if runtime.GOOS == "windows" { + t.Skip("lockTimeout is implemented using signals. Windows doesn't support sending signals, so we skip this test.") + } + b, bCleanup := testBackendDefault(t) defer bCleanup()