mirror of
https://github.com/halejohn/Cloudreve.git
synced 2026-01-26 09:34:57 +08:00
Feat: task queue / compression task
This commit is contained in:
@@ -51,7 +51,7 @@ func TestFileSystem_Compress(t *testing.T) {
|
||||
// 查找上传策略
|
||||
asserts.NoError(cache.Set("policy_1", model.Policy{Type: "local"}, -1))
|
||||
|
||||
zipFile, err := fs.Compress(ctx, []uint{1}, []uint{1})
|
||||
zipFile, err := fs.Compress(ctx, []uint{1}, []uint{1}, true)
|
||||
asserts.NoError(err)
|
||||
asserts.NotEmpty(zipFile)
|
||||
asserts.Contains(zipFile, "archive_")
|
||||
@@ -76,7 +76,7 @@ func TestFileSystem_Compress(t *testing.T) {
|
||||
)
|
||||
asserts.NoError(cache.Set("setting_temp_path", "tests", -1))
|
||||
|
||||
zipFile, err := fs.Compress(ctx, []uint{1}, []uint{1})
|
||||
zipFile, err := fs.Compress(ctx, []uint{1}, []uint{1}, true)
|
||||
asserts.Error(err)
|
||||
asserts.Empty(zipFile)
|
||||
}
|
||||
@@ -100,7 +100,7 @@ func TestFileSystem_Compress(t *testing.T) {
|
||||
)
|
||||
asserts.NoError(cache.Set("setting_temp_path", "tests", -1))
|
||||
|
||||
zipFile, err := fs.Compress(ctx, []uint{1}, []uint{1})
|
||||
zipFile, err := fs.Compress(ctx, []uint{1}, []uint{1}, true)
|
||||
asserts.Error(err)
|
||||
asserts.Equal(ErrObjectNotExist, err)
|
||||
asserts.Empty(zipFile)
|
||||
|
||||
Reference in New Issue
Block a user