refactor(*): 稳定期治理 - 收敛核心架构、错误语义并修复跨项目数据竞态
This commit is contained in:
1 parent
bacd502f5c
commit
b5f3413ded
298 files changed
+12681
-26428
No files matched your search
@@ -1,6 +1,7 @@
|
||||
package service
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"testing"
|
||||
|
||||
"infinite-canvas/backend/internal/model"
|
||||
@@ -16,8 +17,10 @@ func TestValidateStructuredStorageQuotaRejectsBytesAndCounts(t *testing.T) {
|
||||
if err := validateStructuredStorageQuotaWithPolicy(usage, "asset", false, 9, policy); err == nil {
|
||||
t.Fatal("validateStructuredStorageQuota() byte error = nil")
|
||||
}
|
||||
if err := validateStructuredStorageQuotaWithPolicy(usage, "asset", true, 0, policy); err == nil {
|
||||
t.Fatal("validateStructuredStorageQuota() count error = nil")
|
||||
err := validateStructuredStorageQuotaWithPolicy(usage, "asset", true, 0, policy)
|
||||
var quota *AppError
|
||||
if err == nil || !errors.As(err, "a) || quota.Code != CodeQuotaExceeded || quota.Status != CodeForbidden {
|
||||
t.Fatalf("validateStructuredStorageQuota() count error = %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user