The runtime serves a bundle its module's state (hq ADR 0201) #48

Merged
mesh-admin merged 4 commits from feat/module-state-on-the-bus into main 2026-10-04 01:43:38 +00:00
Showing only changes of commit dac8812968 - Show all commits
+5 -5
View File
@@ -10,11 +10,11 @@ import (
func TestACredentialNamedFieldIsFoundAnywhereInAValue(t *testing.T) { func TestACredentialNamedFieldIsFoundAnywhereInAValue(t *testing.T) {
for value, want := range map[string]string{ for value, want := range map[string]string{
`{"url":"http://x","headers":{"Authorization":"Bearer s"}}`: "Authorization", `{"url":"http://x","headers":{"Authorization":"Bearer s"}}`: "Authorization",
`[{"name":"a","env":{"API_KEY":"s"}}]`: "API_KEY", `[{"name":"a","env":{"API_KEY":"s"}}]`: "API_KEY",
`{"refresh_token":"s"}`: "refresh_token", `{"refresh_token":"s"}`: "refresh_token",
`{"clientSecret":"s"}`: "clientSecret", `{"clientSecret":"s"}`: "clientSecret",
`{"maxTokens":4096,"name":"a","generation":3}`: "", `{"maxTokens":4096,"name":"a","generation":3}`: "",
`"just a string"`: "", `"just a string"`: "",
} { } {
if got := credentialField(json.RawMessage(value)); got != want { if got := credentialField(json.RawMessage(value)); got != want {
t.Errorf("%s: found %q, want %q", value, got, want) t.Errorf("%s: found %q, want %q", value, got, want)