fix: lazysecrets list keeps each entry on one line, errors to their first

This commit is contained in:
keb committed 2026-10-14 21:24:01 +02:00
1 parent 7b377fd468
commit 24b38d7321
3 files changed
+29 -2

No files matched your search

+12
View File
@@ -211,3 +211,15 @@ func TestListKinds(t *testing.T) {
t.Error("a list that failed wasn't listed")
}
}
func TestErrorsAreOneLine(t *testing.T) {
for in, want := range map[string]string{
"403 Forbidden: Caller is not authorized\nCaller: appid=x;oid=y\nVault: kv;location=z": "403 Forbidden: Caller is not authorized",
"\n timeout\tafter 30s\n": "timeout after 30s",
"": "unreadable",
} {
if got := firstLine(in); got != want {
t.Errorf("firstLine(%q) = %q, want %q", in, got, want)
}
}
}