498c6f17a6
Persist three global ntfy switches in server_settings: run_finished (default on: auto-mode runs notify on success, read inside the transition transaction; on/off modes unchanged), chat_needs_you (default on: gates chat question/approval alerts) and chat_reply_finished (default off: one alert per finished assistant turn). Expose notification_settings / set_notification_settings over the websocket protocol, add a Phone notifications section with Material and Cupertino checkboxes in Settings, document the settings, and keep the cli, tui, stage and pipeline test packages from inheriting a real ntfy configuration.
17 lines
505 B
Go
17 lines
505 B
Go
package cli
|
|
|
|
import (
|
|
"os"
|
|
"testing"
|
|
)
|
|
|
|
// TestMain isolates the package from an operator's real notification setup:
|
|
// these tests run real servers and runs, a developer shell may export the
|
|
// installed server's ntfy configuration, and no test may publish to it.
|
|
func TestMain(m *testing.M) {
|
|
for _, name := range []string{"PIPELINES_NTFY_URL", "PIPELINES_NTFY_PUBLIC_URL", "PIPELINES_NTFY_TOKEN", "PIPELINES_NTFY_TOKEN_FILE", "PIPELINES_WEB_PUBLIC_URL"} {
|
|
os.Unsetenv(name)
|
|
}
|
|
os.Exit(m.Run())
|
|
}
|