skip timeout lock tests on windows (#3288)

Signed-off-by: Diogenes Fernandes <diofeher@gmail.com>
This commit is contained in:
Diógenes Fernandes 2025-09-17 16:56:19 -03:00 committed by GitHub
parent ff9657f5b7
commit 2d5ea98257
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 12 additions and 2 deletions

View file

@ -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)
}
}

View file

@ -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()