Fix wiki deploy

This commit is contained in:
2026-05-20 20:28:58 +02:00
parent c37b27b720
commit 282b5d271b
6 changed files with 78 additions and 13 deletions
+13 -7
View File
@@ -278,6 +278,7 @@ topdata:
deploy_manifest: wiki-manifest.json
deploy_edit_summary: Custom summary
title_prefix_min_length: 4
status_listing_scope: namespace
stale_pages:
default: report
live_cleanup: archive
@@ -361,6 +362,9 @@ autogen:
if got, want := effective.TopData.Wiki.TitlePrefixMinLength, 4; got != want {
t.Fatalf("expected wiki title prefix minimum length %d, got %d", want, got)
}
if got, want := effective.TopData.Wiki.StatusListingScope, "namespace"; got != want {
t.Fatalf("expected wiki status listing scope %q, got %q", want, got)
}
if got, want := effective.Autogen.Cache.MaxAge, "30m"; got != want {
t.Fatalf("expected autogen cache max age %q, got %q", want, got)
}
@@ -866,13 +870,14 @@ func TestValidateLayoutRejectsInvalidTopDataWikiConfig(t *testing.T) {
TopData: TopDataConfig{
Source: "topdata",
Wiki: TopDataWikiConfig{
Source: "../wiki",
Renderer: "dokuwiki",
LinkStrategy: "rewrite_links",
NamespacesFile: "../namespaces.yaml",
TablesFile: "../tables.yaml",
TemplatesDir: ".",
ManualSectionsDir: "../manual",
Source: "../wiki",
Renderer: "dokuwiki",
LinkStrategy: "rewrite_links",
StatusListingScope: "global",
NamespacesFile: "../namespaces.yaml",
TablesFile: "../tables.yaml",
TemplatesDir: ".",
ManualSectionsDir: "../manual",
StalePages: TopDataWikiStalePagesConfig{
Default: "delete",
LiveCleanup: "delete",
@@ -890,6 +895,7 @@ func TestValidateLayoutRejectsInvalidTopDataWikiConfig(t *testing.T) {
"topdata.wiki.source",
"topdata.wiki.renderer",
"topdata.wiki.link_strategy",
"topdata.wiki.status_listing_scope",
"topdata.wiki.namespaces_file",
"topdata.wiki.tables_file",
"topdata.wiki.templates_dir",