Staff roles (viewer, operator, billing) and the console's Audit view
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
f8fcecd640
commit
b60cf45adf
19 files changed
+352
-24
No files matched your search
@@ -649,3 +649,17 @@ func TestGuardrailsSayWhereTheyApplyFrom(t *testing.T) {
|
||||
t.Error("no Guardrails… in the menu")
|
||||
}
|
||||
}
|
||||
|
||||
func TestTheAuditViewListsChangesAndOpensOne(t *testing.T) {
|
||||
m, _ := consoleWith(t, cAudit)
|
||||
m.width, m.height = 160, 40
|
||||
m.data.audit = []store.AuditEvent{{At: time.Now(), Actor: "ilker", Source: "api",
|
||||
Action: "POST /api/v1/models", Target: "qwen", Status: 200, Detail: `{"name":"qwen"}`}}
|
||||
if v := m.View(); !strings.Contains(v, "POST /api/v1/models") || !strings.Contains(v, "ilker") {
|
||||
t.Fatalf("not listed:\n%s", v)
|
||||
}
|
||||
tm := press(m, "enter")
|
||||
if v := tm.View(); !strings.Contains(v, `"name":"qwen"`) {
|
||||
t.Errorf("not opened:\n%s", v)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user