mirror of
https://github.com/cloudreve/cloudreve.git
synced 2025-10-31 00:27:31 +08:00
Feat: user storage pack
This commit is contained in:
@ -28,6 +28,7 @@ func TestGenericBeforeUpload(t *testing.T) {
|
||||
Size: 5,
|
||||
Name: "1.txt",
|
||||
}
|
||||
cache.Set("pack_size_0", uint64(0), 0)
|
||||
ctx := context.WithValue(context.Background(), fsctx.FileHeaderCtx, file)
|
||||
fs := FileSystem{
|
||||
User: &model.User{
|
||||
@ -266,6 +267,7 @@ func TestHookIsFileExist(t *testing.T) {
|
||||
|
||||
func TestHookValidateCapacity(t *testing.T) {
|
||||
asserts := assert.New(t)
|
||||
cache.Set("pack_size_1", uint64(0), 0)
|
||||
fs := &FileSystem{User: &model.User{
|
||||
Model: gorm.Model{ID: 1},
|
||||
Storage: 0,
|
||||
@ -313,6 +315,7 @@ func TestHookResetPolicy(t *testing.T) {
|
||||
|
||||
func TestHookChangeCapacity(t *testing.T) {
|
||||
asserts := assert.New(t)
|
||||
cache.Set("pack_size_1", uint64(0), 0)
|
||||
|
||||
// 容量增加 失败
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user