Skip to content

Commit

Permalink
a
Browse files Browse the repository at this point in the history
  • Loading branch information
Radu Carpa committed Jan 15, 2024
1 parent e6363e1 commit 38fd840
Showing 1 changed file with 15 additions and 5 deletions.
20 changes: 15 additions & 5 deletions tools/test/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,11 @@ function srchome() {
cd $SOURCE_PATH
}

function wait_for_httpd() {
echo 'Waiting for httpd'
curl --output /dev/null --silent --retry 15 --retry-all-errors --retry-delay 1 -k https://localhost/ping
}

function wait_for_database() {
echo 'Waiting for database to be ready'
while ! python3 -c "from rucio.db.sqla.session import wait_for_database; wait_for_database()"
Expand Down Expand Up @@ -79,11 +84,13 @@ elif [ "$SUITE" == "docs" ]; then
tools/test/check_rest_api_documentation.sh $REST_API_DOC_FILENAME

elif [ "$SUITE" == "votest" ]; then
wait_for_database
VOTEST_HELPER=$RUCIO_HOME/tools/test/votest_helper.py
VOTEST_CONFIG_FILE=$RUCIO_HOME/etc/docker/test/matrix_policy_package_tests.yml
echo "VOTEST: Overriding policy section in rucio.cfg"
python $VOTEST_HELPER --vo "$POLICY" --vo-config --file $VOTEST_CONFIG_FILE
echo "VOTEST: Restarting httpd to load config"
wait_for_httpd
httpd -k restart

TESTS=$(python $VOTEST_HELPER --vo "$POLICY" --tests --file $VOTEST_CONFIG_FILE)
Expand All @@ -93,17 +100,20 @@ elif [ "$SUITE" == "votest" ]; then
elif [ "$SUITE" == "multi_vo" ]; then
VO1_HOME="$RUCIO_HOME"
mkdir -p "$VO1_HOME/etc"
python3 $SOURCE_PATH/tools/merge_rucio_configs.py --use-env \
-s "$CFG_PATH"/rucio_autotests_common.cfg "$CFG_PATH"/rucio_multi_vo_tst_postgres14.cfg \
-d "$VO1_HOME"/etc/rucio.cfg
httpd -k restart

VO2_HOME="$RUCIO_HOME/../ts2"
mkdir -p "$VO2_HOME/etc"

python3 $SOURCE_PATH/tools/merge_rucio_configs.py --use-env \
-s "$CFG_PATH"/rucio_autotests_common.cfg "$CFG_PATH"/rucio_multi_vo_ts2_postgres14.cfg \
-d "$VO2_HOME"/etc/rucio.cfg

python3 $SOURCE_PATH/tools/merge_rucio_configs.py --use-env \
-s "$CFG_PATH"/rucio_autotests_common.cfg "$CFG_PATH"/rucio_multi_vo_tst_postgres14.cfg \
-d "$VO1_HOME"/etc/rucio.cfg

wait_for_httpd
httpd -k restart

wait_for_database

tools/run_multi_vo_tests_docker.sh
Expand Down

0 comments on commit 38fd840

Please sign in to comment.