aboutsummaryrefslogtreecommitdiff
path: root/config/test_data
diff options
context:
space:
mode:
authorJulien Dessaux2021-01-13 15:38:19 +0100
committerJulien Dessaux2021-01-13 15:38:19 +0100
commit19e747f1669d8ae64619686569929a59d5722b8c (patch)
tree370b8742f7563e1b750f5ad494e654a7fcc24838 /config/test_data
parentProperly test the minimal config contents (diff)
downloadshell-game-launcher-19e747f1669d8ae64619686569929a59d5722b8c.tar.gz
shell-game-launcher-19e747f1669d8ae64619686569929a59d5722b8c.tar.bz2
shell-game-launcher-19e747f1669d8ae64619686569929a59d5722b8c.zip
Finished implementing config tests
Diffstat (limited to '')
-rw-r--r--config/test_data/duplicate_game.yaml30
-rw-r--r--config/test_data/fake_nethack_directory/.keep0
-rw-r--r--config/test_data/invalid_game.yaml21
-rw-r--r--config/test_data/unreachable_game.yaml4
4 files changed, 55 insertions, 0 deletions
diff --git a/config/test_data/duplicate_game.yaml b/config/test_data/duplicate_game.yaml
new file mode 100644
index 0000000..f01a017
--- /dev/null
+++ b/config/test_data/duplicate_game.yaml
@@ -0,0 +1,30 @@
+App:
+ WorkingDirectory: var/
+ MaxUsers: 1
+ AllowRegistration: true
+ MaxNickLen: 15
+ MenuMaxIdleTime: 600
+
+Menus:
+ anonymous:
+ MenuEntries:
+ - Key: q
+ Label: quit
+ Action: quit
+ logged_in:
+ MenuEntries:
+ - Key: p
+ Label: play
+ Action: play test
+
+Games:
+ test:
+ ChrootPath: test_data/fake_nethack_directory
+ FileMode: 0777
+ Commands:
+ - wait
+ test:
+ ChrootPath: test_data/fake_nethack_directory
+ FileMode: 0777
+ Commands:
+ - wait
diff --git a/config/test_data/fake_nethack_directory/.keep b/config/test_data/fake_nethack_directory/.keep
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/config/test_data/fake_nethack_directory/.keep
diff --git a/config/test_data/invalid_game.yaml b/config/test_data/invalid_game.yaml
new file mode 100644
index 0000000..d58c3ee
--- /dev/null
+++ b/config/test_data/invalid_game.yaml
@@ -0,0 +1,21 @@
+App:
+ WorkingDirectory: var/
+ MaxUsers: 1
+ AllowRegistration: true
+ MaxNickLen: 15
+ MenuMaxIdleTime: 600
+
+Menus:
+ anonymous:
+ MenuEntries:
+ - Key: q
+ Label: quit
+ Action: quit
+ logged_in:
+ MenuEntries:
+ - Key: p
+ Label: play
+ Action: play test
+
+Games:
+ test:
diff --git a/config/test_data/unreachable_game.yaml b/config/test_data/unreachable_game.yaml
index 5af610b..f2f22e2 100644
--- a/config/test_data/unreachable_game.yaml
+++ b/config/test_data/unreachable_game.yaml
@@ -19,3 +19,7 @@ Menus:
Games:
unreachable:
+ ChrootPath: test_data/fake_nethack_directory
+ FileMode: 0777
+ Commands:
+ - wait