Configure full Docker setup and confirm consequential actions

This commit is contained in:
2026-10-09 21:34:47 +01:00
parent f60599230c
commit f700d1beb2
31 changed files with 587 additions and 49 deletions
+21
View File
@@ -81,3 +81,24 @@ func TestCtrlCRemainsGlobal(t *testing.T) {
t.Fatal("Ctrl+C did not quit")
}
}
func TestQuitUsesCommandInsteadOfQ(t *testing.T) {
for _, m := range []Model{New(context.Background(), ""), panelModel(t), runInspectionModel()} {
_, cmd := m.Update(tea.KeyMsg{Type: tea.KeyRunes, Runes: []rune{'q'}})
if cmd != nil {
t.Fatal("q must not quit")
}
if !slices.Contains(m.pageCommands(), ":quit") {
t.Fatal("quit command missing")
}
m = press(m, ":")
m = press(m, "quit")
_, cmd = m.Update(tea.KeyMsg{Type: tea.KeyEnter})
if cmd == nil {
t.Fatal("quit command did not exit")
}
if _, ok := cmd().(tea.QuitMsg); !ok {
t.Fatal("quit command did not return QuitMsg")
}
}
}