Apply deployment permissions to checkpoints

This commit is contained in:
2026-09-11 15:03:39 +00:00
parent ea503acd42
commit 7498fda030
6 changed files with 162 additions and 24 deletions

View File

@@ -5,7 +5,6 @@ import (
"encoding/json"
"os"
"path/filepath"
"runtime"
"strings"
"testing"
"unicode/utf8"
@@ -106,27 +105,6 @@ func TestFilesystemCheckpointRoundTripsAllStages(t *testing.T) {
})
}
if runtime.GOOS != "windows" {
t.Run("restrictive permissions", func(t *testing.T) {
root := filepath.Join(fixture.root, mustRelativePath(t, fixture.identity))
err := filepath.Walk(root, func(path string, info os.FileInfo, err error) error {
if err != nil {
return err
}
want := os.FileMode(0o600)
if info.IsDir() {
want = 0o700
}
if got := info.Mode().Perm(); got != want {
t.Errorf("%s permissions = %o, want %o", path, got, want)
}
return nil
})
if err != nil {
t.Fatal(err)
}
})
}
}
func TestFilesystemCheckpointRejectsMissingAndCorruptState(t *testing.T) {