Add a suitable test config for the daemon
authorJeremy Stanley <fungi@yuggoth.org>
Tue, 28 Mar 2017 02:21:39 +0000 (02:21 +0000)
committerJeremy Stanley <fungi@yuggoth.org>
Tue, 28 Mar 2017 02:21:39 +0000 (02:21 +0000)
In service of more repeatable testing and improved feature coverage,
include a test fixture for a version of the normal sample
configuration with some additional non-default features enabled and
some settings tuned to values which make testing easier/faster (not
recommended for production use):

* allow "testuser" to automatically be an admin when created

* enable data backup copies but keep only 3 when rotating

* turn on file-backed logging

* background the daemon process once initialized

* write a pidfile

* inject status updates into logs every 25 ticks

* save and rotate datafiles every 5 ticks

.gitignore
mudpy/tests/fixtures/test_config.yaml [new file with mode: 0644]

index 8f15c08..28e167f 100644 (file)
@@ -9,5 +9,4 @@ capture_*.log
 data/
 mudpy/__pycache__/
 mudpy/tests/__pycache__/
-test_config.yaml
 var/
diff --git a/mudpy/tests/fixtures/test_config.yaml b/mudpy/tests/fixtures/test_config.yaml
new file mode 100644 (file)
index 0000000..5051c26
--- /dev/null
@@ -0,0 +1,68 @@
+# Copyright (c) 2004-2017 Jeremy Stanley <fungi@yuggoth.org>. Permission
+# to use, copy, modify, and distribute this software is granted under
+# terms provided in the LICENSE file distributed with this software.
+
+__control__:
+    default_files: { "account": "account.yaml", "actor": "actor.yaml", "area": "area.yaml", "command": "command.yaml", "internal": "internal.yaml", "menu": "menu.yaml", "other": "other.yaml", "prop": "prop.yaml" }
+    include_dirs: [ "sample" ]
+    include_files: [ "archetype.yaml" ]
+    private_files: [ "account.yaml" ]
+    read_only: yes
+
+.mudpy.linguistic.actions: { "?": "ask", ",": "begin", "-": "begin", ":": "begin", ";": "begin", "!": "exclaim", "...": "muse", ".": "say" }
+.mudpy.linguistic.default_punctuation: .
+.mudpy.linguistic.typos: { "i": "I", "i'd": "I'd", "i'll": "I'll", "i'm": "I'm", "teh": "the", "theyre": "they're", "youre": "you're" }
+
+.mudpy.limit.admins: [ testadmin ]
+.mudpy.limit.avatars: 7
+.mudpy.limit.backups: 3
+.mudpy.limit.password_tries: 3
+
+.mudpy.log.file: var/mudpy.log
+.mudpy.log.lines: 1000
+.mudpy.log.stdout: true
+#.mudpy.log.syslog: mudpy
+
+.mudpy.movement.down.enter_term: above
+.mudpy.movement.down.exit_term: downward
+.mudpy.movement.down.vector: [0,0,-1]
+.mudpy.movement.east.enter_term: the west
+.mudpy.movement.east.exit_term: to the east
+.mudpy.movement.east.vector: [1,0,0]
+.mudpy.movement.north.enter_term: the south
+.mudpy.movement.north.exit_term: to the north
+.mudpy.movement.north.vector: [0,1,0]
+.mudpy.movement.south.enter_term: the north
+.mudpy.movement.south.exit_term: to the south
+.mudpy.movement.south.vector: [0,-1,0]
+.mudpy.movement.up.enter_term: below
+.mudpy.movement.up.exit_term: upward
+.mudpy.movement.up.vector: [0,0,1]
+.mudpy.movement.west.enter_term: the east
+.mudpy.movement.west.exit_term: to the west
+.mudpy.movement.west.vector: [-1,0,0]
+
+.mudpy.network.host: '::1'
+.mudpy.network.port: 6669
+
+.mudpy.process.daemon: true
+.mudpy.process.pidfile: var/mudpy.pid
+
+internal:storage:
+    default_dir: "data"
+    #root_path: "."
+    search_path: [ "", "etc", "share", "data" ]
+
+internal:time:
+    definition_d: 24h
+    definition_h: 60mi
+    definition_mi: 10r
+    definition_mo: 28d
+    definition_r: 6
+    definition_w: 7d
+    definition_y: 12mo
+    frequency_log: 25
+    frequency_save: 5
+    linkdead: { "default": 6000, "entering_account_name": 600, "active": 6048000 }
+    idle: { "default": 5000, "entering_account_name": 500, "active": 5040000 }
+    increment: 0.1