feat: restart to apply update, privileged helper, rollback

This commit is contained in:
fsylvain committed 2026-10-01 21:36:40 +02:00
1 parent 70460e4170
commit 54e8fd5fed
63 files changed
+8635 -164

No files matched your search

+34
View File
@@ -0,0 +1,34 @@
//go:build !linux
package test
import (
"RenewCMS/internal/domain/update"
infraUpdate "RenewCMS/internal/infrastructure/update"
"errors"
"testing"
)
func TestNoFollowFilesystemStubRefuses(t *testing.T) {
files := infraUpdate.NewNoFollowFilesystem()
_, lstatErr := files.Lstat("x")
_, readErr := files.ReadFile("x")
_, tempErr := files.MakePrivateTempDir()
for name, err := range map[string]error{
"lstat": lstatErr,
"read": readErr,
"tempdir": tempErr,
"create": files.CreateExclusive("x", nil, 0o600),
"copy": files.Copy("x", "y", 0o600),
"rename": files.Rename("x", "y"),
"remove": files.Remove("x"),
"removeAll": files.RemoveAll("x"),
"chmod": files.Chmod("x", 0o600),
} {
if !errors.Is(err, update.ErrHelperUnsupported) {
t.Errorf("%s = %v", name, err)
}
}
}