mirror of
https://github.com/kopia/kopia.git
synced 2026-01-24 22:38:00 -05:00
server: test flake fix (#839)
Addresses https://github.com/kopia/kopia/runs/1915273219?check_suite_focus=true Verified by testing 100 times.
This commit is contained in:
@@ -46,6 +46,9 @@ func startServer(ctx context.Context, t *testing.T) *repo.APIServerInfo {
|
||||
|
||||
s.SetRepository(ctx, env.Repository)
|
||||
|
||||
// ensure we disconnect the repository before shutting down the server.
|
||||
t.Cleanup(func() { s.SetRepository(ctx, nil) })
|
||||
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user