feat: expand gameplay and state persistence
- add character imprint, awakening, and equipment refinement - add equipment ticket gacha and persistent progression fields - add request-scoped account transactions with crash recovery - persist age confirmation and isolate client plugin patches - separate one-off save repair tools from shipped tooling
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"path/filepath"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestValidateAccountStatePathsRequiresOneTransactionDirectory(t *testing.T) {
|
||||
root := t.TempDir()
|
||||
progress := filepath.Join(root, "progress.json")
|
||||
deck := filepath.Join(root, "deck.json")
|
||||
if err := validateAccountStatePaths(root, progress, deck); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if err := validateAccountStatePaths(root, filepath.Join(root, "renamed.json"), deck); err == nil {
|
||||
t.Fatal("renamed progress escaped transaction allow-list")
|
||||
}
|
||||
if err := validateAccountStatePaths(root, progress, filepath.Join(t.TempDir(), "deck.json")); err == nil {
|
||||
t.Fatal("deck outside account transaction directory was accepted")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user