Files
sshtermy/internal/relay/testlog_test.go
T
db9979andClaude Opus 5.5 075e267064 Automatische Aktionen absichern (Sicherheitsprüfung 1–9) (#122)
* Gefahrenregeln: alle Regelgruppen, zeilenweise, Lücken als root; Agent: root/Admin fragt, Standard Vorsichtig

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018i4GUjLxnD1qZgVKVc7UFm

* Team-Abo: Schutz bleibt, Tunnel ohne Autostart, geänderte Runbooks/Schnellbefehle erst ansehen

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018i4GUjLxnD1qZgVKVc7UFm

* Dialoge von selbst: eine Sekunde Tastensperre, warten statt ersetzen; MCP-Gefahr j zweimal

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018i4GUjLxnD1qZgVKVc7UFm

* Zeitpläne: neue Hosts erst nach Bestätigung, Änderndes nicht stundenlang nachholen, Team-Runbooks erst ansehen

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018i4GUjLxnD1qZgVKVc7UFm

* Switch-Shell: keine Tasten während sshTermy tippt, Esc bricht ab, Syslog-Einrichtung verwirft bei Fehler, nicht im Konfigurationsmodus

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018i4GUjLxnD1qZgVKVc7UFm

* Broadcast und Zeitpläne: Probelauf auf einem Host, Stopp nach 3 Fehlern

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018i4GUjLxnD1qZgVKVc7UFm

* trzsz: Dateien vom Server erst nach Rückfrage, nie überschreiben

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018i4GUjLxnD1qZgVKVc7UFm

* Geheimnisse lesen fragt nach: Agent, Plan-Erkundung, MCP (auch sudo)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018i4GUjLxnD1qZgVKVc7UFm

* Doku: README DE/EN, Webseite, Kurzreferenz und Hilfe zu den Sicherungen

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018i4GUjLxnD1qZgVKVc7UFm

* CI: Relay-Tests loggen nach Testende nicht mehr (Race), PowerShell erkennt offene Eingabe zusätzlich am Fehlercode

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018i4GUjLxnD1qZgVKVc7UFm

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-10 11:36:00 +01:00

26 lines
451 B
Go

package relay
import (
"sync"
"testing"
)
// testLogf: wie t.Logf, schweigt aber nach Testende. Handler und Anker
// laufen in eigenen Goroutinen und loggen sonst noch nach dem Test (Race).
func testLogf(t *testing.T) func(string, ...any) {
var mu sync.Mutex
done := false
t.Cleanup(func() {
mu.Lock()
done = true
mu.Unlock()
})
return func(f string, a ...any) {
mu.Lock()
defer mu.Unlock()
if !done {
t.Logf(f, a...)
}
}
}