aboutsummaryrefslogtreecommitdiff
path: root/internal/admin/api_entity_path_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'internal/admin/api_entity_path_test.go')
-rw-r--r--internal/admin/api_entity_path_test.go16
1 files changed, 10 insertions, 6 deletions
diff --git a/internal/admin/api_entity_path_test.go b/internal/admin/api_entity_path_test.go
index 3a0f87b..a9cafd0 100644
--- a/internal/admin/api_entity_path_test.go
+++ b/internal/admin/api_entity_path_test.go
@@ -28,9 +28,11 @@ func TestEntityAPICannotEscapeData(t *testing.T) {
if err := accounts.SaveAccount(&player.Account{Name: "auditor", Admin: true}); err != nil {
t.Fatal(err)
}
- s, err := NewServer(config.Default(), false, accounts, nil, nil, nil, nil, dir,
- nil, nil, nil, nil, filepath.Join(dir, "config.yaml"),
- func(fn func()) bool { fn(); return true })
+ s, err := NewServer(ServerDeps{
+ Config: config.Default(), Accounts: accounts, DataDir: dir,
+ ConfigPath: filepath.Join(dir, "config.yaml"),
+ RunOnOwner: func(fn func()) bool { fn(); return true },
+ })
if err != nil {
t.Fatal(err)
}
@@ -98,9 +100,11 @@ func TestTechModuleCreateRejectsTraversalID(t *testing.T) {
if err := accounts.SaveAccount(&player.Account{Name: "auditor", Admin: true}); err != nil {
t.Fatal(err)
}
- s, err := NewServer(config.Default(), false, accounts, nil, nil, nil, nil, dir,
- nil, nil, nil, nil, filepath.Join(dir, "config.yaml"),
- func(fn func()) bool { fn(); return true })
+ s, err := NewServer(ServerDeps{
+ Config: config.Default(), Accounts: accounts, DataDir: dir,
+ ConfigPath: filepath.Join(dir, "config.yaml"),
+ RunOnOwner: func(fn func()) bool { fn(); return true },
+ })
if err != nil {
t.Fatal(err)
}