Hold the secrets row to the have read's error, as the loop fix's Env.Held returns it (issue 1126)

This commit is contained in:
2026-10-28 12:13:09 +01:00
parent 16df7d0b7a
commit 9d04ae7edd
+3 -3
View File
@@ -546,11 +546,11 @@ func TestTheNodeComposesItsWantsFromTheBus(t *testing.T) {
{"a box at another entry", delivery.Seals{"grafana.ini#secrets.secret-key": rotatedBox}, "box-again"},
} {
secretsEnv := coreEnv
secretsEnv.Held = func(module string) (delivery.Seals, []string) {
secretsEnv.Held = func(module string) (delivery.Seals, []string, error) {
if module == "grafana" {
return row.held, nil
return row.held, nil, nil
}
return nil, nil
return nil, nil, nil
}
got := delivery.SealsIn(New(secretsEnv).keepRunning(ini("box-again", "box-other"), nil))
if got["grafana.ini#secrets.postgres-database"] != row.want || got["grafana.ini#secrets.secret-key"] != "box-other" {