fix: preserve snapshot symlinks and guard incomplete upgrade copies
This commit is contained in:
@@ -8,6 +8,7 @@ import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"syscall"
|
||||
"testing"
|
||||
)
|
||||
|
||||
@@ -30,7 +31,7 @@ func TestRestoreSnapshotCopyFailureDoesNotConsumeRetention(t *testing.T) {
|
||||
}
|
||||
configWrite(t, filepath.Join(base, name, "keep"), name)
|
||||
}
|
||||
if err := os.Symlink("missing-target", filepath.Join(home, "dangling")); err != nil {
|
||||
if err := syscall.Mkfifo(filepath.Join(home, "dangling"), 0600); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
body := fmt.Sprintf(`{"backup_id":%q,"password":"original-password"}`, result.ID)
|
||||
|
||||
Reference in New Issue
Block a user