Merge branch 'feat/expiring' into feat/l-for-details
CI / Checks (pull_request) Successful in 25s
PR title / Conventional title (pull_request) Successful in 2s

# Conflicts:
#	docs/azure.md
#	internal/ui/app/app_test.go
This commit is contained in:
keb committed 2026-10-11 13:56:22 +02:00
commit b64ca81dfe
10 files changed
+364 -3

No files matched your search

+22
View File
@@ -1290,3 +1290,25 @@ func TestContainerDetails(t *testing.T) {
t.Errorf("state %+v", st)
}
}
func TestExpiringInStatus(t *testing.T) {
t.Parallel()
d := newDriverOpts(t, Options{ExpiryWarning: 30 * 24 * time.Hour}, fake.Azure(0))
d.keys("3", "]", "]") // load kv-app-prod's certificates
if !strings.Contains(d.screen(), "⚠ 1 expiring") {
t.Errorf("status line:\n%s", d.screen())
}
d.keys("0")
scr := d.screen()
for _, want := range []string{"expiring ✗ expired old-tls · kv-app-prod", "in 1 of 3 vaults (ctrl+a in search loads all)"} {
if !strings.Contains(scr, want) {
t.Errorf("missing %q:\n%s", want, scr)
}
}
d.keys("3", "[", "[", "0", "enter") // elsewhere, then to it from the status pane
d.m.fields.SelectWhere(func(f panes.Field) bool { return f.Label == "expiring" })
d.keys("enter")
if _, v, o := d.selected(); v != "kv-app-prod" || o != "old-tls" {
t.Errorf("enter went to %s/%s\n%s", v, o, d.screen())
}
}