From 6e92f112344f9e83e5ad2dcaa10c653d81ef0873 Mon Sep 17 00:00:00 2001 From: Markus Heck Date: Mon, 27 Jan 2025 17:27:58 +0100 Subject: [PATCH] fix integration test users, update readme, update version --- README.md | 21 ++++++++++++--------- classes/playbook.php | 4 ++-- version.php | 2 +- 3 files changed, 15 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 6f38341..15165c1 100644 --- a/README.md +++ b/README.md @@ -3,15 +3,18 @@ This playbook configures a moodle instance with AdLer. The following roles are available: -- test_users: Creates test users for manual use -- moodle_dev_env: For moodle development (don't install plugins) -- integration_test: For integration and end-to-end tests (activate mobile services, create test users for automated tests) - -The following environment variables are used: -- DECLARATIVE_SETUP_MANAGER_PASSWORD: Password for the manager user (role: test_users) -- DECLARATIVE_SETUP_STUDENT_PASSWORD: Password for the student user (role: test_users) -- DECLERATIVE_SETUP_INTEGRATION_TEST_MANAGER_PASSWORD: Password for the integration test manager user (role: integration_test) -- DECLERATIVE_SETUP_INTEGRATION_TEST_STUDENT_PASSWORD: Password for the integration test student user (role: integration_test) +- *test_users*: Creates test users for manual use + - usernames: manager, student + - environment variables: + - DECLARATIVE_SETUP_MANAGER_PASSWORD: Password for the manager user + - DECLARATIVE_SETUP_STUDENT_PASSWORD: Password for the student user +- *moodle_dev_env*: For moodle development (don't install plugins) +- *integration_test*: For integration and end-to-end tests + - activate mobile services + - create test users for automated tests (integration_test_manager, integration_test_student) + - environment variables: + - DECLERATIVE_SETUP_INTEGRATION_TEST_MANAGER_PASSWORD: Password for the integration test manager user + - DECLERATIVE_SETUP_INTEGRATION_TEST_STUDENT_PASSWORD: Password for the integration test student user ## files/plugins.json This file is required if `moodle_dev_env` role is not used. Get the current version from diff --git a/classes/playbook.php b/classes/playbook.php index 6672c94..1793d5e 100644 --- a/classes/playbook.php +++ b/classes/playbook.php @@ -116,12 +116,12 @@ protected function playbook_implementation(): void { if ($this->has_role('integration_test')) { // Create test users $play = new user(new user_model( - 'manager', + 'integration_test_manager', $this->get_environment_variable('INTEGRATION_TEST_MANAGER_PASSWORD'), )); $play->play(); $play = new user(new user_model( - 'student', + 'integration_test_student', $this->get_environment_variable('INTEGRATION_TEST_STUDENT_PASSWORD'), )); $play->play(); diff --git a/version.php b/version.php index 86aaf15..9d3da20 100644 --- a/version.php +++ b/version.php @@ -25,7 +25,7 @@ defined('MOODLE_INTERNAL') || die(); $plugin->component = 'playbook_adler'; -$plugin->release = '0.1.0'; +$plugin->release = '0.2.1'; $plugin->version = 2024121000; $plugin->requires = 2024042200; $plugin->maturity = MATURITY_STABLE;