diff --git a/backend/internal/infra/qualityguard/bootstrap_test.go b/backend/internal/infra/qualityguard/bootstrap_test.go index 6e501f75..236d831c 100644 --- a/backend/internal/infra/qualityguard/bootstrap_test.go +++ b/backend/internal/infra/qualityguard/bootstrap_test.go @@ -4,6 +4,7 @@ import ( "encoding/json" "os" "path/filepath" + "runtime" "testing" "time" @@ -31,7 +32,9 @@ func TestPrepareWritesPrivateScopedBootstrap(t *testing.T) { if err != nil { t.Fatal(err) } - if info.Mode().Perm() != 0o600 { + // Windows has no POSIX permission bits: the os.WriteFile mode argument + // is ignored and files always report 0666-style permissions. + if runtime.GOOS != "windows" && info.Mode().Perm() != 0o600 { t.Fatalf("mode = %o", info.Mode().Perm()) } var payload bootstrapFile diff --git a/backend/internal/transport/http/egress/handler_test.go b/backend/internal/transport/http/egress/handler_test.go index 9c88abfe..ad182620 100644 --- a/backend/internal/transport/http/egress/handler_test.go +++ b/backend/internal/transport/http/egress/handler_test.go @@ -5,6 +5,7 @@ import ( "errors" "net/http/httptest" "os" + "runtime" "strings" "testing" "time" @@ -120,7 +121,9 @@ func TestUpdateQualityGuardConfigWritesPrivateAtomicFile(t *testing.T) { if err != nil { t.Fatal(err) } - if info.Mode().Perm() != 0o600 { + // Windows has no POSIX permission bits: the os.WriteFile mode argument + // is ignored and files always report 0666-style permissions. + if runtime.GOOS != "windows" && info.Mode().Perm() != 0o600 { t.Fatalf("runtime config mode = %o", info.Mode().Perm()) } }