功能修改

This commit is contained in:
npc0-hue
2026-07-20 16:42:33 +08:00
parent 48b8ad8d6c
commit a0e69417db
224 changed files with 22015 additions and 884 deletions
@@ -0,0 +1,19 @@
package domain
import "testing"
func TestCopyGamePluginRuntimeProfilesCopiesLogEvents(t *testing.T) {
profiles := GamePluginRuntimeProfiles{
LogEvents: []RuntimeLogEvent{{
Key: "chat-message", Title: "Chat message", SourceKey: "chat-log", EventType: "chat.message",
Permission: "server.logs.read", SchemaRef: "schemas/log-events/chat-message.schema.json", RetentionDays: 30, Severity: "info",
}},
}
copied := CopyGamePluginRuntimeProfiles(profiles)
copied.LogEvents[0].Title = "Mutated"
if profiles.LogEvents[0].Title != "Chat message" {
t.Fatalf("expected log event declarations to be copied, got %+v", profiles.LogEvents)
}
}