29
0
mirror of https://github.com/joomla/joomla-cms.git synced 2024-05-28 07:53:37 +00:00
cms/tests/System/drone-system-run.sh
Allon Moritz 7611824c5c
Move API system tests to cypress (#40135)
* tests

* api

* artiucles crud

* banners

* contact

* media

* media

* Remove codeception

* cs

* more traces of codeception

* readd certs

* dependencies

* more deps

* secret

* cs

* better doc

* write

* config workaround

* cs

* revert

* prepare db for api tests

* variable

* revert pool

* end connections

* no limit

* cs

* prefix

* Update tests/cypress/drone-system-run.sh

* run specific specs in drone

* Update tests/README.md

Co-authored-by: Brian Teeman <brian@teeman.net>

* Update tests/cypress/integration/api/com_media/Files.cy.js

Co-authored-by: Brian Teeman <brian@teeman.net>

* Update tests/cypress/integration/api/com_media/Files.cy.js

Co-authored-by: Brian Teeman <brian@teeman.net>

* postgres

* media on postgres

* sign

* cs

* remove more traces

* basic api tests

* cleanup

* path

* run recursive specs

* chmod images folder

* path to cms

* correct dependencies and better cleanup

* cleaner deps

* Update tests/cypress/drone-system-run.sh

Co-authored-by: Brian Teeman <brian@teeman.net>

* missing fields

* stabilize cleanup

* cs

* secret in install test

* order of tests

* optimize cleanup

* cs

* cache the connection

* revert connection cache

* docs

* Rename cypress to system

* lint

* simplification and docs

* docs

* better cleanup

* move

* merge conflict

* remove redundant connect

---------

Co-authored-by: Brian Teeman <brian@teeman.net>
2023-03-20 09:51:42 +01:00

27 lines
811 B
Bash

#!/usr/bin/env bash
set -e
JOOMLA_BASE=$1
TEST_GROUP=$2
DB_ENGINE=$3
DB_HOST=$4
echo "[RUNNER] Prepare test environment"
# Switch to Joomla base directory
cd $JOOMLA_BASE
echo "[RUNNER] Copy files to test installation"
rsync -a --exclude-from=tests/System/exclude.txt $JOOMLA_BASE/ /tests/www/$TEST_GROUP/
chown -R www-data /tests/www/$TEST_GROUP/
# Required for media manager tests
chmod -R 777 /tests/www/$TEST_GROUP/images
echo "[RUNNER] Start Apache"
apache2ctl -D FOREGROUND &
echo "[RUNNER] Run cypress tests"
chmod +rwx /root
npx cypress run --browser=firefox --e2e --env cmsPath=/tests/www/$TEST_GROUP,db_type=$DB_ENGINE,db_host=$DB_HOST,db_password=joomla_ut,db_prefix="${TEST_GROUP}_" --config baseUrl=http://localhost/$TEST_GROUP,screenshotsFolder=$JOOMLA_BASE/tests/System/output/screenshots