Skip to content

Commit

Permalink
b
Browse files Browse the repository at this point in the history
  • Loading branch information
Radu Carpa committed Oct 11, 2023
1 parent 12290d7 commit db7b84a
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 20 deletions.
3 changes: 1 addition & 2 deletions tools/test/run_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,8 +327,7 @@ def run_with_httpd(
tests_env = ()
tests_arg = ()

run('docker', *namespace_args, 'exec', *tests_env, rucio_container, './tools/test/test.sh', *tests_arg,
env={**caseenv, **namespace_env})
run('docker', *namespace_args, 'exec', *tests_env, rucio_container, './tools/test/test.sh', *tests_arg)

# if everything went through without an exception, mark this case as a success
return True
Expand Down
37 changes: 19 additions & 18 deletions tools/test/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,20 @@ generate_rucio_cfg(){

# Prepare the test configurations

if [ "$RDBMS" == "oracle" ]; then
generate_rucio_cfg $CFG_PATH/rucio_oracle.cfg $RUCIO_HOME/etc/rucio.cfg
cp $CFG_PATH/alembic_oracle.ini $RUCIO_HOME/etc/alembic.ini

elif [ "$RDBMS" == "mysql8" ]; then
generate_rucio_cfg $CFG_PATH/rucio_mysql8.cfg $RUCIO_HOME/etc/rucio.cfg
cp $CFG_PATH/alembic_mysql8.ini $RUCIO_HOME/etc/alembic.ini

elif [ "$RDBMS" == "postgres14" ]; then
generate_rucio_cfg $CFG_PATH/rucio_postgres14.cfg $RUCIO_HOME/etc/rucio.cfg
cp $CFG_PATH/alembic_postgres14.ini $RUCIO_HOME/etc/alembic.ini
fi


if [ "$SUITE" == "client" -o "$SUITE" == "client_syntax" ]; then
cd $SOURCE_PATH
cp etc/docker/test/extra/rucio_client.cfg etc/rucio.cfg
Expand All @@ -42,7 +56,6 @@ elif [ "$SUITE" == "syntax" -o "$SUITE" == "docs" ]; then
generate_rucio_cfg "$CFG_PATH"/rucio_syntax.cfg "$SOURCE_PATH"/etc/rucio.cfg

elif [ "$SUITE" == "votest" ]; then
generate_rucio_cfg $CFG_PATH/rucio_postgres14.cfg $RUCIO_HOME/etc/rucio.cfg
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"
Expand All @@ -52,23 +65,11 @@ elif [ "$SUITE" == "votest" ]; then

elif [ "$SUITE" == "remote_dbs" ] || [ "$SUITE" == "multi_vo" ]; then

if [ "$RDBMS" == "oracle" ]; then
generate_rucio_cfg $CFG_PATH/rucio_oracle.cfg $RUCIO_HOME/etc/rucio.cfg
cp $CFG_PATH/alembic_oracle.ini $RUCIO_HOME/etc/alembic.ini

elif [ "$RDBMS" == "mysql8" ]; then
generate_rucio_cfg $CFG_PATH/rucio_mysql8.cfg $RUCIO_HOME/etc/rucio.cfg
cp $CFG_PATH/alembic_mysql8.ini $RUCIO_HOME/etc/alembic.ini

elif [ "$RDBMS" == "postgres14" ]; then
if [ "$SUITE" == "multi_vo" ]; then
mkdir -p $RUCIO_HOME/etc/multi_vo/tst/etc
mkdir -p $RUCIO_HOME/etc/multi_vo/ts2/etc
generate_rucio_cfg $CFG_PATH/rucio_multi_vo_tst_postgres14.cfg $RUCIO_HOME/etc/multi_vo/tst/etc/rucio.cfg
generate_rucio_cfg $CFG_PATH/rucio_multi_vo_ts2_postgres14.cfg $RUCIO_HOME/etc/multi_vo/ts2/etc/rucio.cfg
fi
generate_rucio_cfg $CFG_PATH/rucio_postgres14.cfg $RUCIO_HOME/etc/rucio.cfg
cp $CFG_PATH/alembic_postgres14.ini $RUCIO_HOME/etc/alembic.ini
if [ "$SUITE" == "multi_vo" ]; then
mkdir -p $RUCIO_HOME/etc/multi_vo/tst/etc
mkdir -p $RUCIO_HOME/etc/multi_vo/ts2/etc
generate_rucio_cfg $CFG_PATH/rucio_multi_vo_tst_postgres14.cfg $RUCIO_HOME/etc/multi_vo/tst/etc/rucio.cfg
generate_rucio_cfg $CFG_PATH/rucio_multi_vo_ts2_postgres14.cfg $RUCIO_HOME/etc/multi_vo/ts2/etc/rucio.cfg
fi

echo 'Waiting for database to be ready'
Expand Down

0 comments on commit db7b84a

Please sign in to comment.