aboutsummaryrefslogtreecommitdiff
path: root/pkg/config/test_data
diff options
context:
space:
mode:
authorJulien Dessaux2021-11-17 10:13:06 +0100
committerJulien Dessaux2021-11-17 10:13:06 +0100
commitc3263c03776401ad1263a9fb8f5a44a8ed44d61b (patch)
tree7dac91753cb4428ede2ba72fb09eca9ba6c2daab /pkg/config/test_data
parentUpdated dependencies (diff)
downloadshell-game-launcher-c3263c03776401ad1263a9fb8f5a44a8ed44d61b.tar.gz
shell-game-launcher-c3263c03776401ad1263a9fb8f5a44a8ed44d61b.tar.bz2
shell-game-launcher-c3263c03776401ad1263a9fb8f5a44a8ed44d61b.zip
Refactored package structure
Diffstat (limited to 'pkg/config/test_data')
-rw-r--r--pkg/config/test_data/duplicate_game.yaml30
-rw-r--r--pkg/config/test_data/duplicate_menu.yaml28
-rw-r--r--pkg/config/test_data/fake_nethack_directory/.keep0
-rw-r--r--pkg/config/test_data/invalid_app.yaml11
-rw-r--r--pkg/config/test_data/invalid_game.yaml21
-rw-r--r--pkg/config/test_data/invalid_menus.yaml19
-rw-r--r--pkg/config/test_data/invalid_yaml1
-rw-r--r--pkg/config/test_data/minimal.yaml18
-rw-r--r--pkg/config/test_data/no_anonymous_menu.yaml18
-rw-r--r--pkg/config/test_data/no_logged_in_menu.yaml18
-rw-r--r--pkg/config/test_data/non_existant_chopts.yaml18
-rw-r--r--pkg/config/test_data/non_existant_game.yaml18
-rw-r--r--pkg/config/test_data/non_existant_menu.yaml18
-rw-r--r--pkg/config/test_data/not_enough_menus.yaml13
-rw-r--r--pkg/config/test_data/unreachable_game.yaml25
-rw-r--r--pkg/config/test_data/unreachable_menu.yaml23
16 files changed, 279 insertions, 0 deletions
diff --git a/pkg/config/test_data/duplicate_game.yaml b/pkg/config/test_data/duplicate_game.yaml
new file mode 100644
index 0000000..f01a017
--- /dev/null
+++ b/pkg/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/pkg/config/test_data/duplicate_menu.yaml b/pkg/config/test_data/duplicate_menu.yaml
new file mode 100644
index 0000000..3dbefb7
--- /dev/null
+++ b/pkg/config/test_data/duplicate_menu.yaml
@@ -0,0 +1,28 @@
+App:
+ WorkingDirectory: var/
+ MaxUsers: 1
+ AllowRegistration: true
+ MaxNickLen: 15
+ MenuMaxIdleTime: 600
+
+Menus:
+ anonymous:
+ MenuEntries:
+ - Key: t
+ Label: test
+ Action: menu test
+ logged_in:
+ MenuEntries:
+ - Key: q
+ Label: quit
+ Action: quit
+ test:
+ MenuEntries:
+ - Key: q
+ Label: quit
+ Action: quit
+ test:
+ MenuEntries:
+ - Key: a
+ Label: login
+ Action: login
diff --git a/pkg/config/test_data/fake_nethack_directory/.keep b/pkg/config/test_data/fake_nethack_directory/.keep
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/pkg/config/test_data/fake_nethack_directory/.keep
diff --git a/pkg/config/test_data/invalid_app.yaml b/pkg/config/test_data/invalid_app.yaml
new file mode 100644
index 0000000..ed236ea
--- /dev/null
+++ b/pkg/config/test_data/invalid_app.yaml
@@ -0,0 +1,11 @@
+Menus:
+ anonymous:
+ MenuEntries:
+ - Key: q
+ Label: quit
+ Action: quit
+ logged_in:
+ MenuEntries:
+ - Key: q
+ Label: quit
+ Action: quit
diff --git a/pkg/config/test_data/invalid_game.yaml b/pkg/config/test_data/invalid_game.yaml
new file mode 100644
index 0000000..d58c3ee
--- /dev/null
+++ b/pkg/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/pkg/config/test_data/invalid_menus.yaml b/pkg/config/test_data/invalid_menus.yaml
new file mode 100644
index 0000000..1df5fbf
--- /dev/null
+++ b/pkg/config/test_data/invalid_menus.yaml
@@ -0,0 +1,19 @@
+App:
+ WorkingDirectory: var/
+ MaxUsers: 1
+ AllowRegistration: true
+ MaxNickLen: 15
+ MenuMaxIdleTime: 600
+
+Menus:
+ anonymous:
+ MenuEntries:
+ - Key: q
+ Label: quit
+ Action: quit
+ logged_in:
+ MenuEntries:
+ - Key: q
+ Label: quit
+ Action: quit
+ test:
diff --git a/pkg/config/test_data/invalid_yaml b/pkg/config/test_data/invalid_yaml
new file mode 100644
index 0000000..db1ddad
--- /dev/null
+++ b/pkg/config/test_data/invalid_yaml
@@ -0,0 +1 @@
+blargh(ads)
diff --git a/pkg/config/test_data/minimal.yaml b/pkg/config/test_data/minimal.yaml
new file mode 100644
index 0000000..22a0a6c
--- /dev/null
+++ b/pkg/config/test_data/minimal.yaml
@@ -0,0 +1,18 @@
+App:
+ WorkingDirectory: var/
+ MaxUsers: 1
+ AllowRegistration: true
+ MaxNickLen: 15
+ MenuMaxIdleTime: 600
+
+Menus:
+ anonymous:
+ MenuEntries:
+ - Key: q
+ Label: quit
+ Action: quit
+ logged_in:
+ MenuEntries:
+ - Key: q
+ Label: quit
+ Action: quit
diff --git a/pkg/config/test_data/no_anonymous_menu.yaml b/pkg/config/test_data/no_anonymous_menu.yaml
new file mode 100644
index 0000000..a015160
--- /dev/null
+++ b/pkg/config/test_data/no_anonymous_menu.yaml
@@ -0,0 +1,18 @@
+App:
+ WorkingDirectory: var/
+ MaxUsers: 1
+ AllowRegistration: true
+ MaxNickLen: 15
+ MenuMaxIdleTime: 600
+
+Menus:
+ test:
+ MenuEntries:
+ - Key: q
+ Label: quit
+ Action: quit
+ logged_in:
+ MenuEntries:
+ - Key: q
+ Label: quit
+ Action: quit
diff --git a/pkg/config/test_data/no_logged_in_menu.yaml b/pkg/config/test_data/no_logged_in_menu.yaml
new file mode 100644
index 0000000..43d0054
--- /dev/null
+++ b/pkg/config/test_data/no_logged_in_menu.yaml
@@ -0,0 +1,18 @@
+App:
+ WorkingDirectory: var/
+ MaxUsers: 1
+ AllowRegistration: true
+ MaxNickLen: 15
+ MenuMaxIdleTime: 600
+
+Menus:
+ anonymous:
+ MenuEntries:
+ - Key: q
+ Label: quit
+ Action: quit
+ test:
+ MenuEntries:
+ - Key: q
+ Label: quit
+ Action: quit
diff --git a/pkg/config/test_data/non_existant_chopts.yaml b/pkg/config/test_data/non_existant_chopts.yaml
new file mode 100644
index 0000000..d3f796d
--- /dev/null
+++ b/pkg/config/test_data/non_existant_chopts.yaml
@@ -0,0 +1,18 @@
+App:
+ WorkingDirectory: var/
+ MaxUsers: 1
+ AllowRegistration: true
+ MaxNickLen: 15
+ MenuMaxIdleTime: 600
+
+Menus:
+ anonymous:
+ MenuEntries:
+ - Key: q
+ Label: quit
+ Action: quit
+ logged_in:
+ MenuEntries:
+ - Key: t
+ Label: test
+ Action: chopts invalid
diff --git a/pkg/config/test_data/non_existant_game.yaml b/pkg/config/test_data/non_existant_game.yaml
new file mode 100644
index 0000000..9bf6a38
--- /dev/null
+++ b/pkg/config/test_data/non_existant_game.yaml
@@ -0,0 +1,18 @@
+App:
+ WorkingDirectory: var/
+ MaxUsers: 1
+ AllowRegistration: true
+ MaxNickLen: 15
+ MenuMaxIdleTime: 600
+
+Menus:
+ anonymous:
+ MenuEntries:
+ - Key: q
+ Label: quit
+ Action: quit
+ logged_in:
+ MenuEntries:
+ - Key: t
+ Label: test
+ Action: play invalid
diff --git a/pkg/config/test_data/non_existant_menu.yaml b/pkg/config/test_data/non_existant_menu.yaml
new file mode 100644
index 0000000..f0f30a3
--- /dev/null
+++ b/pkg/config/test_data/non_existant_menu.yaml
@@ -0,0 +1,18 @@
+App:
+ WorkingDirectory: var/
+ MaxUsers: 1
+ AllowRegistration: true
+ MaxNickLen: 15
+ MenuMaxIdleTime: 600
+
+Menus:
+ anonymous:
+ MenuEntries:
+ - Key: t
+ Label: test
+ Action: menu invalid
+ logged_in:
+ MenuEntries:
+ - Key: q
+ Label: quit
+ Action: quit
diff --git a/pkg/config/test_data/not_enough_menus.yaml b/pkg/config/test_data/not_enough_menus.yaml
new file mode 100644
index 0000000..f585f44
--- /dev/null
+++ b/pkg/config/test_data/not_enough_menus.yaml
@@ -0,0 +1,13 @@
+App:
+ WorkingDirectory: var/
+ MaxUsers: 1
+ AllowRegistration: true
+ MaxNickLen: 15
+ MenuMaxIdleTime: 600
+
+Menus:
+ test:
+ MenuEntries:
+ - Key: q
+ Label: quit
+ Action: quit
diff --git a/pkg/config/test_data/unreachable_game.yaml b/pkg/config/test_data/unreachable_game.yaml
new file mode 100644
index 0000000..f2f22e2
--- /dev/null
+++ b/pkg/config/test_data/unreachable_game.yaml
@@ -0,0 +1,25 @@
+App:
+ WorkingDirectory: var/
+ MaxUsers: 1
+ AllowRegistration: true
+ MaxNickLen: 15
+ MenuMaxIdleTime: 600
+
+Menus:
+ anonymous:
+ MenuEntries:
+ - Key: q
+ Label: quit
+ Action: quit
+ logged_in:
+ MenuEntries:
+ - Key: q
+ Label: quit
+ Action: quit
+
+Games:
+ unreachable:
+ ChrootPath: test_data/fake_nethack_directory
+ FileMode: 0777
+ Commands:
+ - wait
diff --git a/pkg/config/test_data/unreachable_menu.yaml b/pkg/config/test_data/unreachable_menu.yaml
new file mode 100644
index 0000000..f947cf7
--- /dev/null
+++ b/pkg/config/test_data/unreachable_menu.yaml
@@ -0,0 +1,23 @@
+App:
+ WorkingDirectory: var/
+ MaxUsers: 1
+ AllowRegistration: true
+ MaxNickLen: 15
+ MenuMaxIdleTime: 600
+
+Menus:
+ anonymous:
+ MenuEntries:
+ - Key: q
+ Label: quit
+ Action: quit
+ logged_in:
+ MenuEntries:
+ - Key: q
+ Label: quit
+ Action: quit
+ test:
+ MenuEntries:
+ - Key: q
+ Label: quit
+ Action: quit