Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Test] update selenium image from V3 to V4 #9403

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 4 additions & 60 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: '2'
version: '3.8'
services:
db:
build:
Expand All @@ -13,11 +13,10 @@ services:
- MYSQL_RANDOM_ROOT_PASSWORD=yes

selenium:
image: selenium/standalone-firefox-debug:3.141.59-zirconium
volumes:
- /dev/shm:/dev/shm
image: selenium/standalone-firefox:4.25
ports:
- "5900:5900"
- "4444:4444" # Selenium WebDriver port
- "5900:5900" # VNC Viewer port (optional for VNC)

web:
build:
Expand Down Expand Up @@ -62,58 +61,3 @@ services:
- selenium
- web
entrypoint: /app/test/wait-for-services.sh

selenium-debug:
image: selenium/standalone-firefox-debug:3.141.59-zirconium
links:
- web-debug:web
ports:
- "5901:5900"

web-debug:
build:
context: .
dockerfile: Dockerfile.test.php8.debug
volumes:
- ./:/app
- ./test/test_instrument:/app/project/instruments
environment:
- LORIS_DB_CONFIG=/app/test/config.xml
- XDEBUG_CONFIG=remote_host=${XDEBUG_REMOTE_HOST}
- PHP_IDE_CONFIG=serverName=LorisTests
depends_on:
- db
command: php -S 0.0.0.0:8000 -t /app/htdocs /app/htdocs/router.php

unit-tests-debug:
build:
context: .
dockerfile: Dockerfile.test.php8.debug
volumes:
- ./:/app
working_dir: /app
environment:
- LORIS_DB_CONFIG=test/config.xml
- XDEBUG_CONFIG=remote_host=${XDEBUG_REMOTE_HOST}
- PHP_IDE_CONFIG=serverName=LorisTests
depends_on:
- db
entrypoint: /app/test/wait-for-services.sh

integration-tests-debug:
build:
context: .
dockerfile: Dockerfile.test.php8.debug
volumes:
- ./:/app
working_dir: /app
environment:
- LORIS_DB_CONFIG=test/config.xml
- SELENIUM_REQUIRED=true
- XDEBUG_CONFIG=remote_host=${XDEBUG_REMOTE_HOST}
- PHP_IDE_CONFIG=serverName=LorisTests
links:
- db
- selenium-debug:selenium
- web-debug:web
entrypoint: /app/test/wait-for-services.sh
3 changes: 2 additions & 1 deletion test/wait-for-services.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,11 @@ done
if [ -v SELENIUM_REQUIRED ];
then
echo "Waiting for Selenium..."
until $(curl --output /dev/null --silent --head --fail http://selenium:4444/wd/hub); do
until $(curl --output /dev/null --silent --head --fail http://selenium:4444/status); do
sleep 1
done
echo "Selenium is alive"
fi

exec $cmd

Loading