From 1e1e6f3bd1946162f9512f7e447a790e651bdce0 Mon Sep 17 00:00:00 2001 From: Sas Swart Date: Thu, 22 May 2025 08:48:40 +0200 Subject: [PATCH] fix: skip TestReinitializeAgent until we can adapt it for windows (#17968) relates to https://github.com/coder/internal/issues/642 I've reached a timebox trying to get a script for windows to work, so I'm skipping it for now. --- enterprise/coderd/workspaceagents_test.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/enterprise/coderd/workspaceagents_test.go b/enterprise/coderd/workspaceagents_test.go index 44aba69b9f..f0c9b37f3b 100644 --- a/enterprise/coderd/workspaceagents_test.go +++ b/enterprise/coderd/workspaceagents_test.go @@ -7,6 +7,7 @@ import ( "net/http" "os" "regexp" + "runtime" "testing" "time" @@ -89,6 +90,12 @@ func TestReinitializeAgent(t *testing.T) { t.Skip("dbmem cannot currently claim a workspace") } + if runtime.GOOS == "windows" { + t.Skip("test startup script is not supported on windows") + } + + startupScript := fmt.Sprintf("printenv >> %s; echo '---\n' >> %s", tempAgentLog.Name(), tempAgentLog.Name()) + db, ps := dbtestutil.NewDB(t) // GIVEN a live enterprise API with the prebuilds feature enabled client, user := coderdenttest.New(t, &coderdenttest.Options{ @@ -155,7 +162,7 @@ func TestReinitializeAgent(t *testing.T) { Scripts: []*proto.Script{ { RunOnStart: true, - Script: fmt.Sprintf("printenv >> %s; echo '---\n' >> %s", tempAgentLog.Name(), tempAgentLog.Name()), // Make reinitialization take long enough to assert that it happened + Script: startupScript, }, }, Auth: &proto.Agent_Token{