Validate providers and retain complete run debugging context
This commit is contained in:
@@ -26,12 +26,15 @@ func TestStatusPalettePopupAndClosePreservesUnderlyingPage(t *testing.T) {
|
||||
updated, _ := m.Update(receivedMsg(protocol.Message{Type: protocol.Status, ID: "status-1", Status: &protocol.SystemStatus{Hostname: "test-machine", Server: protocol.ServiceStatus{Health: "healthy", Port: "8080"}, Ntfy: protocol.ServiceStatus{Health: "healthy", URL: "http://192.0.2.2:8090", Port: "8090"}, Addresses: []protocol.NetworkAddress{{Interface: "en0", IP: "192.0.2.2"}}}}))
|
||||
m = updated.(Model)
|
||||
view := ansi.Strip(m.View())
|
||||
for _, text := range []string{"Pipelines server", "ntfy", "test-machine", "8080", "8090", "192.0.2.2"} {
|
||||
for _, text := range []string{"Pipelines server", "ntfy", "8080", "8090", "192.0.2.2"} {
|
||||
if !strings.Contains(view, text) {
|
||||
t.Fatal("missing status info", text, view)
|
||||
}
|
||||
}
|
||||
m = press(m, "esc")
|
||||
if strings.Contains(view, "test-machine") || strings.Contains(view, "Client connection:") {
|
||||
t.Fatal("status includes unnecessary metadata", view)
|
||||
}
|
||||
if m.statusOpen || m.runDetail.ID != 42 {
|
||||
t.Fatal("status destroyed run selection")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user