chore(test): Fixed test
All checks were successful
Build and Publish Docker Image / deploy (push) Successful in 1m47s
All checks were successful
Build and Publish Docker Image / deploy (push) Successful in 1m47s
This commit is contained in:
@@ -360,14 +360,14 @@ func TestResumableCleanupRemovesExpiredSessionsAndChunks(t *testing.T) {
|
||||
Name: "note.txt",
|
||||
Size: 4,
|
||||
ContentType: "text/plain",
|
||||
}}, UploadOptions{MaxDays: 1}, 4, time.Millisecond, "")
|
||||
}}, UploadOptions{MaxDays: 1}, 4, time.Hour, "")
|
||||
if err != nil {
|
||||
t.Fatalf("CreateResumableSession returned error: %v", err)
|
||||
}
|
||||
if _, err := service.PutResumableChunk(testContext(), session.ID, session.Files[0].ID, 0, strings.NewReader("hell")); err != nil {
|
||||
t.Fatalf("PutResumableChunk returned error: %v", err)
|
||||
}
|
||||
cleaned, err := service.CleanupExpiredResumableSessions(time.Now().UTC().Add(time.Hour))
|
||||
cleaned, err := service.CleanupExpiredResumableSessions(session.ExpiresAt.Add(time.Second))
|
||||
if err != nil {
|
||||
t.Fatalf("CleanupExpiredResumableSessions returned error: %v", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user