Isolate secrets bootstrap in maintained example tests

This commit is contained in:
2026-11-23 04:22:35 +00:00
parent 26dd5252ab
commit dbf62718d2
2 changed files with 18 additions and 0 deletions

View File

@@ -8,6 +8,13 @@ import (
)
func TestMaintainedApplicationExamplesUseNativeLoading(t *testing.T) {
const token = "SCRIPTORIUM_EXAMPLE_TOKEN"
// Exercise provisioning from absence, restoring the original environment at cleanup.
t.Setenv(token, "")
if err := os.Unsetenv(token); err != nil {
t.Fatal(err)
}
root, err := filepath.Abs(filepath.Join("..", "..", ".."))
if err != nil {
t.Fatal(err)