Bootstrap secrets before configuration loading

This commit is contained in:
2026-09-07 04:13:58 +00:00
parent f0225e937c
commit d31ba5a410
41 changed files with 399 additions and 656 deletions

View File

@@ -2,6 +2,7 @@ package app
import (
"os"
"path/filepath"
"testing"
)
@@ -29,3 +30,13 @@ func restoreEnvAfterTest(t *testing.T, names ...string) {
}
})
}
func mustWriteSecretFile(t *testing.T, path, value string) {
t.Helper()
if err := os.MkdirAll(filepath.Dir(path), 0o755); err != nil {
t.Fatal(err)
}
if err := os.WriteFile(path, []byte(value), 0o600); err != nil {
t.Fatal(err)
}
}