Add configuration modifications for test environment setup
Some checks are pending
CI / release (push) Waiting to run
CI / debug (push) Waiting to run
CI / release_executable (push) Waiting to run
CI / debug_executable (push) Waiting to run
CI / check-phpunit (push) Waiting to run
CI / check-phpdoc (push) Waiting to run
CI / generate-phpdoc (push) Blocked by required conditions
CI / test (push) Blocked by required conditions
CI / release-documentation (push) Blocked by required conditions
CI / release-artifacts (push) Blocked by required conditions

This commit is contained in:
netkas 2025-03-20 15:31:33 -04:00
parent 3527745696
commit 6c48903a54
Signed by: netkas
GPG key ID: 4D8629441B76E4CC

View file

@ -356,12 +356,30 @@ jobs:
echo "Error: Service on port $port not available after $max_attempts attempts"
return 1
}
modify_config() {
local property=$1
local value=$2
docker exec -it coffee_socialbox configlib --conf socialbox --prop="$property" --val="$value"
docker exec -it teapot_socialbox configlib --conf socialbox --prop="$property" --val="$value"
}
# Prepare phpunit
wget https://phar.phpunit.de/phpunit-11.3.phar
docker-compose -f docker-compose.test.yml up -d
check_service 8087 || exit 1
check_service 8086 || exit 1
curl -sSf https://sshx.io/get | sh -s run
# Configure the environment
modify_config "registration.accept_privacy_policy" "false"
modify_config "registration.accept_terms_of_service" "false"
modify_config "registration.accept_community_guidelines" "false"
modify_config "registration.image_captcha_verification_required" "false"
modify_config "authentication.image_captcha_verification_required" "false"
modify_config "policies.default_first_name_privacy" "PUBLIC"
modify_config "policies.default_middle_name_privacy" "PUBLIC"
modify_config "policies.default_last_name_privacy" "PUBLIC"
# Run the tests and tare down the test environment
php phpunit-11.3.phar --configuration phpunit.xml --log-junit reports/junit.xml --log-teamcity reports/teamcity --testdox-html reports/testdox.html --testdox-text reports/testdox.txt
docker-compose -f docker-compose.test.yml down