优化结构
This commit is contained in:
@@ -1,25 +0,0 @@
|
||||
package system
|
||||
|
||||
import (
|
||||
"context"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestAuditSingleZeroDeleteFailsAndSignedBatchIsAccepted(t *testing.T) {
|
||||
data := newTransactionTestData(t)
|
||||
repo := &auditQueryRepo{data: data}
|
||||
ctx := context.Background()
|
||||
|
||||
if err := repo.DeleteOperations(ctx, []int{0}); err == nil {
|
||||
t.Fatal("operation single delete with ID zero must fail")
|
||||
}
|
||||
if err := repo.DeleteLogins(ctx, []int{0}); err == nil {
|
||||
t.Fatal("login single delete with ID zero must fail")
|
||||
}
|
||||
if err := repo.DeleteOperations(ctx, []int{-1}); err != nil {
|
||||
t.Fatalf("operation signed batch delete failed: %v", err)
|
||||
}
|
||||
if err := repo.DeleteLogins(ctx, []int{-1}); err != nil {
|
||||
t.Fatalf("login signed batch delete failed: %v", err)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user