docs: actualizar README de issues — marcar 0029, 0033, 0035 como completados
Tambien resuelve conflicto de test helper newTestAgent entre runtime_test.go (issue 0029) y commands_metrics_test.go (issue 0035) renombrando el segundo a newMetricsTestAgent. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -15,9 +15,9 @@ import (
|
||||
"log/slog"
|
||||
)
|
||||
|
||||
// newTestAgent creates a minimal Agent for testing commands.
|
||||
// newMetricsTestAgent creates a minimal Agent for testing the !metrics command.
|
||||
// Does NOT connect to Matrix or LLM.
|
||||
func newTestAgent(logDir string) *Agent {
|
||||
func newMetricsTestAgent(logDir string) *Agent {
|
||||
cfg := &config.AgentConfig{
|
||||
Agent: config.AgentMeta{
|
||||
ID: "test-bot",
|
||||
@@ -36,7 +36,7 @@ func newTestAgent(logDir string) *Agent {
|
||||
}
|
||||
|
||||
func TestCmdMetrics_NoLogDir(t *testing.T) {
|
||||
a := newTestAgent("")
|
||||
a := newMetricsTestAgent("")
|
||||
result := a.cmdMetrics(context.Background(), decision.MessageContext{})
|
||||
if !strings.Contains(result, "no configurado") {
|
||||
t.Errorf("expected 'no configurado' message, got: %s", result)
|
||||
@@ -49,7 +49,7 @@ func TestCmdMetrics_NoLogsToday(t *testing.T) {
|
||||
agentDir := filepath.Join(dir, "test-bot")
|
||||
os.MkdirAll(agentDir, 0o755)
|
||||
|
||||
a := newTestAgent(dir)
|
||||
a := newMetricsTestAgent(dir)
|
||||
result := a.cmdMetrics(context.Background(), decision.MessageContext{})
|
||||
if !strings.Contains(result, "No hay logs") {
|
||||
t.Errorf("expected 'No hay logs' message, got: %s", result)
|
||||
@@ -81,7 +81,7 @@ func TestCmdMetrics_AggregatesCorrectly(t *testing.T) {
|
||||
t.Fatalf("WriteFile: %v", err)
|
||||
}
|
||||
|
||||
a := newTestAgent(dir)
|
||||
a := newMetricsTestAgent(dir)
|
||||
result := a.cmdMetrics(context.Background(), decision.MessageContext{})
|
||||
|
||||
// Verify the output contains expected metrics
|
||||
@@ -119,7 +119,7 @@ func TestCmdMetrics_LLMLatencyAverage(t *testing.T) {
|
||||
content := strings.Join(lines, "\n") + "\n"
|
||||
os.WriteFile(logFile, []byte(content), 0o644)
|
||||
|
||||
a := newTestAgent(dir)
|
||||
a := newMetricsTestAgent(dir)
|
||||
result := a.cmdMetrics(context.Background(), decision.MessageContext{})
|
||||
|
||||
// Average of 400 and 600 = 500
|
||||
|
||||
Reference in New Issue
Block a user