From cc51a3e16aa2fdcbdfe7ac81cd7f89700fbfb6ff Mon Sep 17 00:00:00 2001 From: Bethuel Mmbaga Date: Thu, 8 Oct 2026 13:55:09 +0300 Subject: [PATCH] [misc] Skip mysql-migrate container tests on Windows (#8121) --- .github/workflows/golang-test-windows.yml | 2 +- tools/mysql-migrate/main_test.go | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/golang-test-windows.yml b/.github/workflows/golang-test-windows.yml index ca300f7df..49be3af58 100644 --- a/.github/workflows/golang-test-windows.yml +++ b/.github/workflows/golang-test-windows.yml @@ -76,7 +76,7 @@ jobs: # resolve; the Where-Object pipeline then drops the broken package by # path. Without -e, go list aborts with empty stdout. run: | - $packages = go list -e ./... | Where-Object { $_ -notmatch '/management' } | Where-Object { $_ -notmatch '/relay' } | Where-Object { $_ -notmatch '/signal' } | Where-Object { $_ -notmatch '/proxy' } | Where-Object { $_ -notmatch '/combined' } | Where-Object { $_ -notmatch '/client/ui$' } + $packages = go list -e ./... | Where-Object { $_ -notmatch '/management' } | Where-Object { $_ -notmatch '/relay' } | Where-Object { $_ -notmatch '/signal' } | Where-Object { $_ -notmatch '/proxy' } | Where-Object { $_ -notmatch '/combined' } | Where-Object { $_ -notmatch '/client/ui$' } | Where-Object { $_ -notmatch '/tools/mysql-migrate' } $goExe = "C:\hostedtoolcache\windows\go\${{ steps.go.outputs.go-version }}\x64\bin\go.exe" $cmd = "$goExe test -tags `"devcert privileged`" -timeout 10m -p 1 $($packages -join ' ') > test-out.txt 2>&1" Set-Content -Path "${{ github.workspace }}\run-tests.cmd" -Value $cmd diff --git a/tools/mysql-migrate/main_test.go b/tools/mysql-migrate/main_test.go index c80fc6e4c..59d444440 100644 --- a/tools/mysql-migrate/main_test.go +++ b/tools/mysql-migrate/main_test.go @@ -32,8 +32,8 @@ import ( const testAccountID = "bf1c8084-ba50-4ce7-9439-34653001fc3b" func TestRun(t *testing.T) { - if os.Getenv("CI") == "true" && runtime.GOOS != "linux" { - t.Skip("needs Docker for the MySQL and Postgres containers") + if runtime.GOOS == "windows" || (os.Getenv("CI") == "true" && runtime.GOOS != "linux") { + t.Skip("needs Docker with Linux containers for MySQL and Postgres") } // Seed in UTC to match the --mysql-timezone default. time.Local = time.UTC @@ -153,8 +153,8 @@ func accountJSON(t *testing.T, ctx context.Context, s store.Store) string { } func TestMySQLTimezone(t *testing.T) { - if os.Getenv("CI") == "true" && runtime.GOOS != "linux" { - t.Skip("needs Docker for the MySQL and Postgres containers") + if runtime.GOOS == "windows" || (os.Getenv("CI") == "true" && runtime.GOOS != "linux") { + t.Skip("needs Docker with Linux containers for MySQL and Postgres") } ctx := context.Background() mysqlDSN := newMySQLDatabase(t, "tz_src")