mirror of
https://github.com/octoleo/restic.git
synced 2024-11-30 00:33:57 +00:00
fix context in archiver tests
This commit is contained in:
parent
fef408a8bd
commit
826cfa0533
@ -91,7 +91,7 @@ func saveFile(t testing.TB, repo restic.Repository, filename string, filesystem
|
|||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
err = repo.Flush(ctx)
|
err = repo.Flush(context.Background())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
@ -839,6 +839,7 @@ func TestArchiverSaveDir(t *testing.T) {
|
|||||||
t.Errorf("wrong stats returned in TreeBlobs, want > 0, got %d", stats.TreeBlobs)
|
t.Errorf("wrong stats returned in TreeBlobs, want > 0, got %d", stats.TreeBlobs)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ctx = context.Background()
|
||||||
node.Name = targetNodeName
|
node.Name = targetNodeName
|
||||||
tree := &restic.Tree{Nodes: []*restic.Node{node}}
|
tree := &restic.Tree{Nodes: []*restic.Node{node}}
|
||||||
treeID, err := repo.SaveTree(ctx, tree)
|
treeID, err := repo.SaveTree(ctx, tree)
|
||||||
@ -934,7 +935,7 @@ func TestArchiverSaveDirIncremental(t *testing.T) {
|
|||||||
|
|
||||||
t.Logf("node subtree %v", node.Subtree)
|
t.Logf("node subtree %v", node.Subtree)
|
||||||
|
|
||||||
err = repo.Flush(ctx)
|
err = repo.Flush(context.Background())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
@ -1091,6 +1092,7 @@ func TestArchiverSaveTree(t *testing.T) {
|
|||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ctx = context.Background()
|
||||||
err = repo.Flush(ctx)
|
err = repo.Flush(ctx)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
|
Loading…
Reference in New Issue
Block a user