aboutsummaryrefslogtreecommitdiff
path: root/internal/validate/shipped_data_test.go
diff options
context:
space:
mode:
authorhistoria <[not public]>2026-09-18 01:50:17 -0400
committerhistoria <[not public]>2026-09-18 01:50:17 -0400
commit87d08f0151e643951769e323995f1c5ed89ee200 (patch)
treedc42a0b30ebb5a00dd7ba505cc4eaa44f4f308bc /internal/validate/shipped_data_test.go
parent32a3c59cebf2a16277e54d715a67adfdbe00b456 (diff)
downloadthehouseoficarus-87d08f0151e643951769e323995f1c5ed89ee200.tar.gz
fix: harden economy recovery, shutdown concurrency, world validation, and inventory-loss paths
Diffstat (limited to 'internal/validate/shipped_data_test.go')
-rw-r--r--internal/validate/shipped_data_test.go20
1 files changed, 20 insertions, 0 deletions
diff --git a/internal/validate/shipped_data_test.go b/internal/validate/shipped_data_test.go
new file mode 100644
index 0000000..9c5bef1
--- /dev/null
+++ b/internal/validate/shipped_data_test.go
@@ -0,0 +1,20 @@
+package validate
+
+import (
+ "path/filepath"
+ "testing"
+)
+
+// TestShippedDataHasNoUnknownFields guards the authored content tree against
+// misspelled or stale YAML keys: every data file is decoded with
+// KnownFields(true), so an unread key (like the old exit-level
+// set_player_flags or the legacy triggers key) fails CI instead of being
+// silently discarded at load time.
+func TestShippedDataHasNoUnknownFields(t *testing.T) {
+ dataDir := filepath.Join("..", "..", "data")
+ for _, issue := range validateKnownFields(dataDir) {
+ if issue.Level == "ERROR" {
+ t.Errorf("%s", issue.Message)
+ }
+ }
+}