mirror of
https://github.com/netbirdio/netbird.git
synced 2026-10-09 06:59:08 +02:00
[misc] Skip mysql-migrate container tests on Windows (#8121)
This commit is contained in:
@@ -76,7 +76,7 @@ jobs:
|
|||||||
# resolve; the Where-Object pipeline then drops the broken package by
|
# resolve; the Where-Object pipeline then drops the broken package by
|
||||||
# path. Without -e, go list aborts with empty stdout.
|
# path. Without -e, go list aborts with empty stdout.
|
||||||
run: |
|
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"
|
$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"
|
$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
|
Set-Content -Path "${{ github.workspace }}\run-tests.cmd" -Value $cmd
|
||||||
|
|||||||
@@ -32,8 +32,8 @@ import (
|
|||||||
const testAccountID = "bf1c8084-ba50-4ce7-9439-34653001fc3b"
|
const testAccountID = "bf1c8084-ba50-4ce7-9439-34653001fc3b"
|
||||||
|
|
||||||
func TestRun(t *testing.T) {
|
func TestRun(t *testing.T) {
|
||||||
if os.Getenv("CI") == "true" && runtime.GOOS != "linux" {
|
if runtime.GOOS == "windows" || (os.Getenv("CI") == "true" && runtime.GOOS != "linux") {
|
||||||
t.Skip("needs Docker for the MySQL and Postgres containers")
|
t.Skip("needs Docker with Linux containers for MySQL and Postgres")
|
||||||
}
|
}
|
||||||
// Seed in UTC to match the --mysql-timezone default.
|
// Seed in UTC to match the --mysql-timezone default.
|
||||||
time.Local = time.UTC
|
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) {
|
func TestMySQLTimezone(t *testing.T) {
|
||||||
if os.Getenv("CI") == "true" && runtime.GOOS != "linux" {
|
if runtime.GOOS == "windows" || (os.Getenv("CI") == "true" && runtime.GOOS != "linux") {
|
||||||
t.Skip("needs Docker for the MySQL and Postgres containers")
|
t.Skip("needs Docker with Linux containers for MySQL and Postgres")
|
||||||
}
|
}
|
||||||
ctx := context.Background()
|
ctx := context.Background()
|
||||||
mysqlDSN := newMySQLDatabase(t, "tz_src")
|
mysqlDSN := newMySQLDatabase(t, "tz_src")
|
||||||
|
|||||||
Reference in New Issue
Block a user