Release URBM 2026.06.15.r011

This commit is contained in:
Mikei386
2026-06-15 07:34:45 +02:00
parent 1e9487e6f2
commit 0c507e0b64
8 changed files with 58 additions and 10 deletions
+25
View File
@@ -130,6 +130,31 @@ func TestStatsUsesRequestedRepositoryCountingMode(t *testing.T) {
}
}
func TestStatsIgnoresProgressBeforePrettyPrintedJSON(t *testing.T) {
dir := t.TempDir()
script := filepath.Join(dir, "restic")
body := `#!/bin/sh
printf '%s\n' '[0:00] 100.00% 12 / 12 index files loaded'
printf '%s\n' '{'
printf '%s\n' ' "total_size": 8192,'
printf '%s\n' ' "total_file_count": 24,'
printf '%s\n' ' "total_blob_count": 16'
printf '%s\n' '}'
`
if err := os.WriteFile(script, []byte(body), 0700); err != nil {
t.Fatal(err)
}
runner := &Runner{Binary: script, RuntimeDir: dir, Secrets: fakeSecrets{"password": "secret"}}
repo := model.Repository{Type: model.RepositoryLocal, Location: "/repo", PasswordRef: "password"}
stats, err := runner.Stats(context.Background(), repo, "raw-data")
if err != nil {
t.Fatal(err)
}
if stats.TotalSize != 8192 || stats.TotalFileCount != 24 || stats.TotalBlobCount != 16 {
t.Fatalf("unexpected stats: %+v", stats)
}
}
func TestStatsUnlocksStaleRepositoryLockAndRetries(t *testing.T) {
dir := t.TempDir()
logPath := filepath.Join(dir, "commands")