From 7b48de296f8ea284d0f3604b6ea161adcfccd9af Mon Sep 17 00:00:00 2001 From: Julien Dessaux Date: Tue, 12 Jan 2021 15:56:54 +0100 Subject: Wrote a minimal config and refactored all tests from it to simplify everything --- config/test_data/duplicate_menu.yaml | 75 ++++-------------------------------- 1 file changed, 7 insertions(+), 68 deletions(-) (limited to 'config/test_data/duplicate_menu.yaml') diff --git a/config/test_data/duplicate_menu.yaml b/config/test_data/duplicate_menu.yaml index d2a00e2..3dbefb7 100644 --- a/config/test_data/duplicate_menu.yaml +++ b/config/test_data/duplicate_menu.yaml @@ -1,89 +1,28 @@ App: WorkingDirectory: var/ - MaxUsers: 512 + MaxUsers: 1 AllowRegistration: true MaxNickLen: 15 MenuMaxIdleTime: 600 - PostLoginCommands: - - mkdir %w/userdata/%u - - mkdir %w/userdata/%u/dumplog - - mkdir %w/userdata/%u/ttyrec Menus: anonymous: - Banner: 'Shell Game Launcher - Anonymous access%n======================================' - XOffset: 5 - YOffset: 2 MenuEntries: - Key: t Label: test Action: menu test - - Key: l - Label: login - Action: login - - Key: r - Label: register - Action: register - - Key: w - Label: watch - Action: watch_menu - - Key: q - Label: quit - Action: quit logged_in: - Banner: 'Shell Game Launcher%n===================' - XOffset: 5 - YOffset: 2 MenuEntries: - - Key: p - Label: play Nethack 3.7 - Action: play nethack3.7 - - Key: o - Label: edit game options - Action: menu options - - Key: w - Label: watch - Action: watch - - Key: r - Label: replay - Action: replay - - Key: c - Label: change password - Action: passwd - - Key: m - Label: change email - Action: chmail - Key: q Label: quit Action: quit test: - Banner: 'Shell Game Launcher%n===================' - XOffset: 5 - YOffset: 2 MenuEntries: - - Key: p - Label: play Nethack 3.7 - Action: play nethack3.7 + - Key: q + Label: quit + Action: quit test: - Banner: 'Duplicate Shell Game Launcher%n===================' - XOffset: 5 - YOffset: 2 MenuEntries: - - Key: p - Label: play Nethack 3.7 - Action: play nethack3.7 - -Games: - nethack3.7: - ChrootPath: /opt/nethack - FileMode: "0666" - ScoreCommands: - - exec /games/nethack -s all - - wait - Commands: - - cp /games/var/save/%u%n.gz /games/var/save/%u%n.gz.bak - - exec /games/nethack -u %n - Env: - NETHACKOPTIONS: "@%ruserdata/%n/%n.nhrc" - - + - Key: a + Label: login + Action: login -- cgit v1.2.3