Skip to content

Commit

Permalink
chore: update API tests to use new retention policy format
Browse files Browse the repository at this point in the history
  • Loading branch information
garethgeorge committed Mar 30, 2024
1 parent b68f7c6 commit 0cae60a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion internal/api/backresthandler_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,9 @@ func TestMultipleBackup(t *testing.T) {
},
Cron: "0 0 1 1 *",
Retention: &v1.RetentionPolicy{
KeepLastN: 1,
Policy: &v1.RetentionPolicy_PolicyKeepLastN{
PolicyKeepLastN: 1,
},
},
},
},
Expand Down
3 changes: 2 additions & 1 deletion pkg/restic/outputs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package restic

import (
"bytes"
"context"
"os/exec"
"testing"
)
Expand All @@ -13,7 +14,7 @@ func TestReadBackupProgressEntries(t *testing.T) {

b := bytes.NewBuffer([]byte(testInput))

summary, err := readBackupProgressEntries(&exec.Cmd{}, b, func(event *BackupProgressEntry) {
summary, err := readBackupProgressEntries(context.Background(), &exec.Cmd{}, b, func(event *BackupProgressEntry) {
t.Logf("event: %v", event)
})
if err != nil {
Expand Down

0 comments on commit 0cae60a

Please sign in to comment.