Update test configuration to ensure deterministic failure for missing config
CI / Go Tests (push) Successful in 12s
CI / Build (push) Successful in 8s
Format / gofmt (push) Successful in 6s
Release Artifacts / Validate release tag (push) Successful in 2s
Release Artifacts / Build and release executables (push) Successful in 14s
Release Artifacts / Build and release Docker image (push) Successful in 26s

- Modified the test case in `main_test.go` to use a directory path for the config argument, ensuring that the configuration initialization fails consistently during testing.
This commit is contained in:
2026-06-01 04:40:05 -05:00
parent bc9077660b
commit 34a0198952
+2 -1
View File
@@ -233,7 +233,8 @@ func TestMainHelperProcess(t *testing.T) {
main()
os.Exit(0)
case "bad-config":
os.Args = []string{"scratchbox", "server", "--config", "/no/such/config.yaml"}
// Use a directory path so config init fails deterministically.
os.Args = []string{"scratchbox", "server", "--config", "/"}
main()
os.Exit(0)
case "missing-config-autogen":