Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit 9c5dc831 authored by Joze RIHTARSIC's avatar Joze RIHTARSIC
Browse files

Pull request #64: Reorganize test modules

Merge in EDELIVERY/smp from EDELIVERY-12701-reorganize-maven-testing-modulues to development

* commit 'f25f9e0f':
  Delete old smp-ui-tests module
  Reorganize test module
parents 091697e2 f25f9e0f
No related branches found
No related tags found
No related merge requests found
Pipeline #132124 canceled
Showing
with 52 additions and 14 deletions
#!/bin/bash #!/bin/bash
# init plan variables
WORKDIR="$(cd -P $(dirname ${BASH_SOURCE[0]} ) && pwd)" WORKDIR="$(cd -P $(dirname ${BASH_SOURCE[0]} ) && pwd)"
cd "${WORKDIR}" || exit 100 source "${WORKDIR}/../../functions/run-test.functions"
echo "Working Directory: ${WORKDIR}" initializeVariables
# project folder
SMP_PROJECT_FOLDER=$(readlink -e "${WORKDIR}/../../..")
#load common functions
source "${SMP_PROJECT_FOLDER}/smp-docker/functions/common.functions"
source "${SMP_PROJECT_FOLDER}/smp-docker/functions/run-test.functions"
[ -f "${WORKDIR}/.env" ] && source "${WORKDIR}/.env"
initializeCommonVariables
SMP_INIT_DATABASE="${SMP_PROJECT_FOLDER}/smp-webapp/src/main/smp-setup/database-scripts/mysql5innodb.ddl" SMP_INIT_DATABASE="${SMP_PROJECT_FOLDER}/smp-webapp/src/main/smp-setup/database-scripts/mysql5innodb.ddl"
#SMP_INIT_DATABASE_DATA="${SMP_PROJECT_FOLDER}/smp-webapp/src/main/smp-setup/database-scripts/mysql5innodb-data.sql" #SMP_INIT_DATABASE_DATA="${SMP_PROJECT_FOLDER}/smp-webapp/src/main/smp-setup/database-scripts/mysql5innodb-data.sql"
SMP_INIT_DATABASE_DATA="${SMP_PROJECT_FOLDER}/smp-soapui-tests/groovy/mysql-4.1_integration_test_data.sql" SMP_INIT_DATABASE_DATA="${SMP_PROJECT_FOLDER}/smp-soapui-tests/groovy/mysql-4.1_integration_test_data.sql"
SMP_VERSION=
# READ arguments # READ arguments
while getopts i:v: option while getopts i:v: option
do do
...@@ -26,8 +18,6 @@ do ...@@ -26,8 +18,6 @@ do
esac esac
done done
discoverApplicationVersion
echo "*****************************************************************" echo "*****************************************************************"
echo "* Start SMP image for version: [$SMP_VERSION]" echo "* Start SMP image for version: [$SMP_VERSION]"
echo "* Plan prefix: [${PLAN_PREFIX}]" echo "* Plan prefix: [${PLAN_PREFIX}]"
......
#!/bin/bash
# init plan variables
WORKDIR="$(cd -P $(dirname ${BASH_SOURCE[0]} ) && pwd)"
source "${WORKDIR}/../../functions/run-test.functions"
initializeVariables
RESULT_FOLDER="${WORKDIR}/results"
# clear old results
rm -rf "${RESULT_FOLDER}"
mkdir -p "${RESULT_FOLDER}"
# define network to connect the tests
DOCKER_NETWORK_NAME="${PLAN_PREFIX}_default"
export DOCKER_NETWORK_NAME
# Starting Docker Compose TEST (in specific project to avoid orphan container warning)
docker compose -f docker-compose.test-api.yml -p "run-${PLAN_PREFIX}" up
docker cp "run-${PLAN_PREFIX}-testapi-1:/data/results/soapui-reports" ./results
#!/bin/bash #!/bin/bash
WORKDIR="$(cd -P $(dirname ${BASH_SOURCE[0]} ) && pwd)" WORKDIR="$(cd -P $(dirname ${BASH_SOURCE[0]} ) && pwd)"
cd "${WORKDIR}" || exit 100 source "${WORKDIR}/../../functions/run-test.functions"
echo "Working Directory: ${WORKDIR}" initializeVariables
# project folder
SMP_PROJECT_FOLDER=$(readlink -e "${WORKDIR}/../../..")
RESULT_FOLDER="${WORKDIR}/results" RESULT_FOLDER="${WORKDIR}/results"
# clear old results # clear old results
rm -rf "${RESULT_FOLDER}" rm -rf "${RESULT_FOLDER}"
mkdir -p "${RESULT_FOLDER}" mkdir -p "${RESULT_FOLDER}"
#load common functions
source "${SMP_PROJECT_FOLDER}/smp-docker/functions/common.functions"
source "${SMP_PROJECT_FOLDER}/smp-docker/functions/run-test.functions"
[ -f "${WORKDIR}/.env" ] && source "${WORKDIR}/.env"
initializeCommonVariables
discoverApplicationVersion
# define network to connect the tests # define network to connect the tests
DOCKER_NETWORK_NAME="${PLAN_PREFIX}_default" DOCKER_NETWORK_NAME="${PLAN_PREFIX}_default"
...@@ -22,4 +16,4 @@ export DOCKER_NETWORK_NAME ...@@ -22,4 +16,4 @@ export DOCKER_NETWORK_NAME
# Starting Docker Compose TEST (in specific project to avoid orphan container warning) # Starting Docker Compose TEST (in specific project to avoid orphan container warning)
docker compose -f docker-compose.test-ui.yml -p "run-${PLAN_PREFIX}" up docker compose -f docker-compose.test-ui.yml -p "run-${PLAN_PREFIX}" up
docker cp "run-${PLAN_PREFIX}-testui-1:/results/surefire-reports" ./results docker cp "run-${PLAN_PREFIX}-testui-1:/data/results/surefire-reports" ./results
#!/bin/bash
# init plan variables
WORKDIR="$(cd -P $(dirname ${BASH_SOURCE[0]} ) && pwd)"
source "${WORKDIR}/../../functions/run-test.functions"
initializeVariables
echo "Clear old containers"
stopAndClearTestContainers
# The .env file is the default method for setting environment variables in the containers. For more # The .env file is the default method for setting environment variables in the containers. For more
# information, see https://docs.docker.com/compose/environment-variables/env-file/ # information, see https://docs.docker.com/compose/environment-variables/env-file/
COMPOSE_PROJECT_NAME=smp-wls122-oradb COMPOSE_PROJECT_NAME=domismp-wls122-oradb
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment