优化结构

This commit is contained in:
Yvan
2026-08-22 12:13:16 +08:00
parent d987244d0e
commit b27a66e9d3
200 changed files with 1794 additions and 1715 deletions
+2 -2
View File
@@ -3,11 +3,11 @@ package system
import (
"context"
"errors"
"kra/internal/biz/system"
"os"
"path/filepath"
"testing"
"kra/internal/biz"
"kra/internal/conf"
)
@@ -44,7 +44,7 @@ func TestLogViewerRejectsPathTraversal(t *testing.T) {
runtime := conf.NewRuntime(nil, &conf.AdminBackend{Zap: &conf.AdminBackend_Zap{Director: t.TempDir()}})
repo := &logFileRepo{data: &Data{runtime: runtime}}
_, err := repo.LogContent(context.Background(), "2026-08-16", "../application.log", nil)
if !errors.Is(err, biz.ErrInvalidLogPath) {
if !errors.Is(err, system.ErrInvalidLogPath) {
t.Fatalf("expected invalid path error, got %v", err)
}
}