32029cf58f
Resolved docs/install.md, internal/cli/app.go, internal/statusview and scripts/setup-native.py: no ntfy anywhere (connection, status, installer constants, troubleshooting ports), keeping the first-run next steps, the unreachable-server and tool/Docker install hints. README drops the C compiler (ntfy was its only user). The installer summary's password wording is now per run (a reinstall in the same process no longer says "you just chose"), and its test checks the URLs then the next steps. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
25 lines
739 B
Go
25 lines
739 B
Go
package statusview
|
|
|
|
import (
|
|
"strings"
|
|
"testing"
|
|
)
|
|
|
|
func TestOfflineStatusShowsTheServerAndRedactsURLCredentials(t *testing.T) {
|
|
s := Offline("ws://user:password@localhost:8080/connect?token=secret#secret")
|
|
text := strings.Join(Lines(s), "\n")
|
|
for _, secret := range []string{"password", "token=", "secret", "user:"} {
|
|
if strings.Contains(text, secret) {
|
|
t.Fatal("credentials exposed", text)
|
|
}
|
|
}
|
|
for _, expected := range []string{"Pipelines server", "unreachable", "pipelines start", "pipelines serve", "8080"} {
|
|
if !strings.Contains(text, expected) {
|
|
t.Fatal("missing offline information", expected, text)
|
|
}
|
|
}
|
|
if strings.Contains(strings.ToLower(text), "ntfy") {
|
|
t.Fatal("status still describes ntfy", text)
|
|
}
|
|
}
|