Phase 9, part 1: editions and their settings
SUPERMARKET_MODE picks local (the default), server or multi. internal/config reads and checks every setting the editions need (database, secret key, storage, the app's own mail, an https address), reporting all problems at once. supermarket config prints them without passwords; supermarket secret-key makes a key. Settings -> About shows the edition. Server and multi-tenant are checked but refuse to start until they're built. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -739,3 +739,19 @@ func TestRedirectKeepsFragmentLast(t *testing.T) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Settings → About shows the edition, and where the local edition keeps
|
||||
// its database.
|
||||
func TestAboutPage(t *testing.T) {
|
||||
s, h := newTestServer(t, nil)
|
||||
rec := do(h, "GET", "/settings/about", nil, nil)
|
||||
if rec.Code != 200 {
|
||||
t.Fatal(rec.Code)
|
||||
}
|
||||
body := rec.Body.String()
|
||||
for _, want := range []string{"Local edition", "SQLite: " + s.DataDir + "/app.db", "SUPERMARKET_MODE", `href="/settings/about" aria-current="page"`} {
|
||||
if !strings.Contains(body, want) {
|
||||
t.Errorf("no %q", want)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user