Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Create simple scripts for all Jenkins tests.
Makes it easier to run exact tests (or subset of tests) from Jenkins locally. Selenium script is particularily interesting because it represents a very simple entry point into selenium testing.
- Loading branch information
Showing
10 changed files
with
153 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
|
||
./run_tests.sh --dockerize --db postgres --external_tmp --clean_pyc -api "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
|
||
./run_tests.sh --dockerize --db postgres --external_tmp --clean_pyc --framework "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/bash | ||
|
||
./scripts/common_startup.sh --dev-wheels | ||
|
||
nosetests test/integration |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
FROM toolshed/requirements | ||
MAINTAINER John Chilton, jmchilton@gmail.com | ||
|
||
RUN apt-get -qq update && \ | ||
apt-get install --no-install-recommends -y postgresql-client python-pip && \ | ||
apt-get autoremove -y && apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* | ||
|
||
ENV GALAXY_ROOT=/galaxy \ | ||
GALAXY_CONFIG_OVERRIDE_ADMIN_USERS=admin@galaxy.org \ | ||
GALAXY_CONFIG_OVERRIDE_ALLOW_USER_DATASET_PURGE=true \ | ||
GALAXY_CONFIG_OVERRIDE_ALLOW_LIBRARY_PATH_PASTE=true \ | ||
GALAXY_CONFIG_OVERRIDE_ENABLE_BETA_WORKFLOW_MODULES=true \ | ||
GALAXY_CONFIG_OVERRIDE_ALLOW_USER_DELETION=true \ | ||
GALAXY_CONFIG_OVERRIDE_DATABASE_CONNECTION=postgresql://postgres@postgres/galaxy \ | ||
GALAXY_CONFIG_OVERRIDE_MASTER_API_KEY=94a548bea347a35e457a804bf75bec53 \ | ||
GALAXY_CONFIG_OVERRIDE_JOB_CONFIG_FILE=/galaxy/config/job_conf.xml.sample_basic \ | ||
GALAXY_CONFIG_OVERRIDE_DATATYPES_CONFIG_FILE=/galaxy/test/functional/tools/sample_datatypes_conf.xml \ | ||
GALAXY_CONFIG_OVERRIDE_TOOL_CONFIG_FILE=/galaxy/test/functional/tools/samples_tool_conf.xml \ | ||
GALAXY_CONFIG_FILE=/galaxy/.ci/jenkins/selenium/galaxy.ini \ | ||
GALAXY_VIRTUAL_ENV=/galaxy_env | ||
|
||
ADD run_galaxy.bash /run_galaxy.bash | ||
EXPOSE 8080 | ||
CMD /run_galaxy.bash |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
version: '2' | ||
services: | ||
postgres: | ||
image: postgres | ||
galaxy: | ||
build: . | ||
image: ubuntu | ||
volumes: | ||
- "${TARGET_ROOT}:${TARGET_PATH}" | ||
links: | ||
- postgres | ||
ports: | ||
- "${GALAXY_PORT}:8080" | ||
selenium: | ||
image: selenium/standalone-chrome:3.0.1-aluminum | ||
ports: | ||
- "${SELENIUM_PORT}:4444" | ||
links: | ||
- galaxy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[server:main] | ||
|
||
use = egg:Paste#http | ||
port = 8080 | ||
host = 0.0.0.0 | ||
use_threadpool = True | ||
threadpool_kill_thread_limit = 10800 | ||
|
||
[app:main] | ||
|
||
paste.app_factory = galaxy.web.buildapp:app_factory |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
sleep 10 # TODO: wait on something instead of just sleeping... | ||
|
||
echo `df` | ||
|
||
createdb -w -U postgres -h postgres galaxy | ||
GALAXY_RUN_ALL=1 bash "$GALAXY_ROOT/run.sh" --daemon --wait | ||
|
||
tail -f "$GALAXY_ROOT/main.log" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
#!/bin/bash | ||
|
||
TEST_DIRECTORY=`dirname $0` | ||
|
||
echo $TEST_DIRECTORY | ||
|
||
find lib -iname '*pyc' -exec rm -rf {} \; | ||
find test -iname '*pyc' -exec rm -rf {} \; | ||
|
||
./scripts/common_startup.sh --dev-wheels | ||
|
||
. .venv/bin/activate | ||
|
||
pip install docker-compose | ||
|
||
# TODO: Let docker-compose pick these at random. | ||
export GALAXY_PORT=`python -c 'import socket; s=socket.socket(); s.bind(("", 0)); print(s.getsockname()[1]); s.close()'` | ||
export SELENIUM_PORT=`python -c 'import socket; s=socket.socket(); s.bind(("", 0)); print(s.getsockname()[1]); s.close()'` | ||
|
||
export TARGET_ROOT=`pwd` | ||
export TARGET_PATH=/galaxy | ||
|
||
cd $TEST_DIRECTORY | ||
|
||
docker-compose build galaxy | ||
docker-compose up -d | ||
|
||
if [ "$1" = "--debug-running-containers" ]; | ||
then | ||
env | ||
exit 0 | ||
fi | ||
|
||
export GALAXY_TEST_EXTERNAL="http://localhost:$GALAXY_PORT/" | ||
|
||
echo "Waiting on docker-compose managed Galaxy server - $GALAXY_TEST_EXTERNAL." | ||
while ! curl -s "$GALAXY_TEST_EXTERNAL"; | ||
do | ||
printf "." | ||
sleep 1; | ||
done; | ||
|
||
# Access Selenium on localhost via port $SELENIUM_PORT | ||
export GALAXY_TEST_SELENIUM_REMOTE=1 | ||
export GALAXY_TEST_SELENIUM_REMOTE_PORT="${SELENIUM_PORT}" | ||
|
||
# Access Galaxy on localhost via port $GALAXY_PORT | ||
export GALAXY_TEST_PORT="${GALAXY_PORT}" | ||
|
||
# Have Selenium access Galaxy at this URL | ||
export GALAXY_TEST_EXTERNAL_FROM_SELENIUM="http://galaxy:8080" | ||
|
||
cd ../../.. | ||
|
||
./run_tests.sh --selenium "$@" | ||
exit_code=$? | ||
|
||
cd $TEST_DIRECTORY | ||
|
||
docker-compose stop | ||
docker-compose rm -f | ||
|
||
exit $exit_code |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
|
||
./run_tests.sh --dockerize --db postgres --external_tmp --clean_pyc --toolshed "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters