Code development platform for open source projects from the European Union institutions :large_blue_circle: EU Login authentication by SMS has been phased out. To see alternatives please check here

Skip to content
Snippets Groups Projects
Commit a6156316 authored by Ahmed GHOUILI's avatar Ahmed GHOUILI
Browse files

Pull request #182: RunSMP20testsBambooPlansStep1

Merge in EDELIVERY/smp from runSMP20testsBambooPlansStep1 to development

* commit '577a01e8':
  remove debug logs
  [EDELIVERY-14159] update default configuration filename and update weblogic keystore
  adjust pom versions
  Update resources for running SMP20 test suite ..
parents 71900c8c 577a01e8
Branches
Tags
No related merge requests found
Pipeline #220602 failed
Showing
with 139 additions and 11 deletions
eDelivery SMP 5.1
- change the default "smp.configuration.file" from "smp.conf.properties" to smp.config.properties
- added new HTTP headers when creating a new resource:
'Resource-Admin' as alternative to ServiceGroup-Owner
'Resource-Group': the name of the group: to define to which group in domain the resource belongs to. The group must be in one of the admin's groups. If not given the first group from the list is used.
......
services:
##
## UI Tests
##
testapi:
image: ${IMAGE_TAG:-edeliverytest}/${IMAGE_SMP_TESTS}:${SMP_VERSION}
environment:
- TEST_PLAN=api
- TEST_URL=http://smp-springboot-mysql.local:8084/smp/
- TEST_FILE_NAME=DomiSMP-Oasis2-soapui-project.xml
- TEST_SUITE=AUTO_BAMBOO_SMP20
networks:
- test-network
networks:
test-network:
name: ${DOCKER_NETWORK_NAME:-domismp-springboot-mysql_default}
external: true
......@@ -6,6 +6,10 @@ source "${WORKDIR}/../../functions/run-test.functions"
initializeVariables
RESULT_FOLDER="${WORKDIR}/results"
SMP_VERSION_SUFFIX=$1
if [ -n "${SMP_VERSION_SUFFIX}" ]; then
SMP_VERSION_SUFFIX="-${SMP_VERSION_SUFFIX}"
fi
# clear old results
rm -rf "${RESULT_FOLDER}"
mkdir -p "${RESULT_FOLDER}"
......@@ -15,5 +19,5 @@ 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 compose -f docker-compose.test-api${SMP_VERSION_SUFFIX}.yml -p "run-${PLAN_PREFIX}" up
docker cp "run-${PLAN_PREFIX}-testapi-1:/data/results/soapui-reports" ./results
services:
##
## API Tests
##
testapi:
image: ${IMAGE_TAG:-edeliverytest}/${IMAGE_SMP_TESTS}:${SMP_VERSION}
environment:
- TEST_PLAN=api
- TEST_URL=http://eulogin.protected.smp.local:8080/smp/
- TEST_FILE_NAME=DomiSMP-Oasis2-soapui-project.xml
- TEST_SUITE=AUTO_BAMBOO_SMP20
networks:
- test-network
networks:
test-network:
name: ${DOCKER_NETWORK_NAME:-domismp-tomcat-mysql_default}
external: true
......@@ -6,6 +6,10 @@ source "${WORKDIR}/../../functions/run-test.functions"
initializeVariables
RESULT_FOLDER="${WORKDIR}/results"
SMP_VERSION_SUFFIX=$1
if [ -n "${SMP_VERSION_SUFFIX}" ]; then
SMP_VERSION_SUFFIX="-${SMP_VERSION_SUFFIX}"
fi
# clear old results
rm -rf "${RESULT_FOLDER}"
mkdir -p "${RESULT_FOLDER}"
......@@ -15,5 +19,5 @@ 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 compose -f docker-compose.test-api${SMP_VERSION_SUFFIX}.yml -p "run-${PLAN_PREFIX}" up
docker cp "run-${PLAN_PREFIX}-testapi-1:/data/results/soapui-reports" ./results
services:
##
## API Tests
##
testapi:
image: ${IMAGE_TAG:-edeliverytest}/${IMAGE_SMP_TESTS}:${SMP_VERSION}
environment:
- TEST_PLAN=api
- TEST_URL=http://smp-httpd/smp/
- TEST_FILE_NAME=DomiSMP-Oasis2-soapui-project.xml
- TEST_SUITE=AUTO_BAMBOO_SMP20
networks:
- test-network
networks:
test-network:
name: ${DOCKER_NETWORK_NAME:-domismp-tomcat-mysql_default}
external: true
......@@ -2,7 +2,12 @@ smp.security.folder=/data/smp/security
smp.jdbc.hibernate.dialect=org.hibernate.dialect.Oracle10gDialect
smp.datasource.jndi=jdbc/eDeliverySmpDs
smp.automation.authentication.external.tls.clientCert.enabled=true
smp.keystore.filename=smp-keystore-docker-demo.p12
smp.keystore.type=PKCS12
smp.truststore.type=PKCS12
smp.truststore.password={DEC}{test123}
smp.keystore.password={DEC}{test123}
smp.log.folder=./logs/
smp.automation.authentication.external.tls.SSLClientCert.enabled=true
smp.cluster.enabled=true
smp.property.refresh.cronJobExpression=0 0/2 * * * ?
......@@ -6,6 +6,10 @@ source "${WORKDIR}/../../functions/run-test.functions"
initializeVariables
RESULT_FOLDER="${WORKDIR}/results"
SMP_VERSION_SUFFIX=$1
if [ -n "${SMP_VERSION_SUFFIX}" ]; then
SMP_VERSION_SUFFIX="-${SMP_VERSION_SUFFIX}"
fi
# clear old results
rm -rf "${RESULT_FOLDER}"
mkdir -p "${RESULT_FOLDER}"
......@@ -15,5 +19,5 @@ 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 compose -f docker-compose.test-api${SMP_VERSION_SUFFIX}.yml -p "run-${PLAN_PREFIX}" up
docker cp "run-${PLAN_PREFIX}-testapi-1:/data/results/soapui-reports" ./results
services:
##
## API Tests
##
testapi:
image: ${IMAGE_TAG:-edeliverytest}/${IMAGE_SMP_TESTS}:${SMP_VERSION}
environment:
- TEST_PLAN=api
- TEST_URL=http://smp-httpd/smp/
- TEST_FILE_NAME=DomiSMP-Oasis2-soapui-project.xml
- TEST_SUITE=AUTO_BAMBOO_SMP20
networks:
- test-network
networks:
test-network:
name: ${DOCKER_NETWORK_NAME:-domismp-tomcat-mysql_default}
external: true
......@@ -2,7 +2,12 @@ smp.security.folder=/data/smp/security
smp.jndi.hibernate.dialect=org.hibernate.dialect.Oracle10gDialect
smp.datasource.jndi=jdbc/eDeliverySmpDs
smp.automation.authentication.external.tls.clientCert.enabled=true
smp.keystore.filename=smp-keystore-docker-demo.p12
smp.keystore.type=PKCS12
smp.truststore.type=PKCS12
smp.truststore.password={DEC}{test123}
smp.keystore.password={DEC}{test123}
smp.log.folder=./logs/
smp.automation.authentication.external.tls.SSLClientCert.enabled=true
smp.cluster.enabled=true
smp.property.refresh.cronJobExpression=0 0/2 * * * ?
......@@ -6,6 +6,11 @@ source "${WORKDIR}/../../functions/run-test.functions"
initializeVariables
RESULT_FOLDER="${WORKDIR}/results"
SMP_VERSION_SUFFIX=$1
if [ -n "${SMP_VERSION_SUFFIX}" ]; then
SMP_VERSION_SUFFIX="-${SMP_VERSION_SUFFIX}"
fi
# clear old results
rm -rf "${RESULT_FOLDER}"
mkdir -p "${RESULT_FOLDER}"
......@@ -15,5 +20,5 @@ 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 compose -f docker-compose.test-api${SMP_VERSION_SUFFIX}.yml -p "run-${PLAN_PREFIX}" up
docker cp "run-${PLAN_PREFIX}-testapi-1:/data/results/soapui-reports" ./results
......@@ -11,6 +11,18 @@ executeUITests(){
exit ${EXIT_CODE}
}
setConfigPropertiesAPITests() {
echo "[INFO] Update soapUI project file and testsuite names ..."
if [ -n "${TEST_SUITE}" ]; then
sed -i "s#<testSuite>.*</testSuite>#<testSuite>${TEST_SUITE}</testSuite>#g" "${TEST_API}"/pom.xml
fi
# TODO Add the legacy test suite to the new project file then remove the following configuration
if [ -n "${TEST_FILE_NAME}" ]; then
sed -i "s#<projectFile>\${basedir}/soapui/.*</projectFile>#<projectFile>\${basedir}/soapui/${TEST_FILE_NAME}</projectFile>#g" "${TEST_API}"/pom.xml
fi
}
executeAPITests() {
echo "[INFO] start execution of the tests from ${TEST_API}"
cd "${TEST_API}"
......@@ -28,6 +40,7 @@ createUIProperties(){
if [ "$TEST_PLAN" == "ui" ]; then
executeUITests
elif [ "$TEST_PLAN" == "api" ]; then
setConfigPropertiesAPITests
executeAPITests
elif [ "$TEST_PLAN" == "manual" ]; then
echo "[INFO] Container will start in idle mode to allow user to manually login and execute tests!"
......
......@@ -82,6 +82,7 @@ COPY container-scripts/* ${ORACLE_HOME}/
COPY container-scripts/init-scripts ${ORACLE_HOME}/init/scripts/
COPY properties/init ${ORACLE_HOME}/init/properties/
COPY artefacts/smp.war ${ORACLE_HOME}/init/
ADD ./artefacts /tmp/artefacts
#Create directory where domain will be written to
......
......@@ -26,8 +26,15 @@ smp.datasource.jndi=jdbc/eDeliverySmpDs
smp.automation.authentication.external.tls.clientCert.enabled=true
smp.log.folder=./logs/
smp.security.folder=${SMP_SECURITY_DIR}/
smp.keystore.filename=mp-keystore-docker-demo.p12
smp.keystore.type=PKCS12
smp.truststore.type=PKCS12
smp.truststore.password={DEC}{test123}
smp.keystore.password={DEC}{test123}
EOT
fi
echo "Copy SMP keystore : ${SMP_SECURITY_DIR}/smp-keystore-docker-demo.p12"
cp /tmp/artefacts/shared-artefacts/smp-keystore-docker-demo.p12 "${SMP_SECURITY_DIR}/smp-keystore-docker-demo.p12"
cp /u01/oracle/init/smp.war "${WL_DOMAIN_HOME}/"
ls -ltr "${WL_DOMAIN_HOME}/"
......
......@@ -4,6 +4,9 @@ smp.locale.folder=/data/smp/locales
smp.jdbc.hibernate.dialect=org.hibernate.dialect.Oracle10gDialect
smp.datasource.jndi=jdbc/eDeliverySmpDs
smp.automation.authentication.external.tls.clientCert.enabled=true
smp.keystore.filename=smp-keystore-docker-demo.p12
smp.keystore.type=PKCS12
smp.truststore.type=PKCS12
smp.truststore.password={DEC}{test123}
smp.keystore.password={DEC}{test123}
smp.log.folder=./logs/
......@@ -81,6 +81,7 @@ COPY container-scripts/* ${ORACLE_HOME}/
COPY container-scripts/init-scripts ${ORACLE_HOME}/init/scripts/
COPY properties/init ${ORACLE_HOME}/init/properties/
COPY artefacts/smp.war ${ORACLE_HOME}/init/
ADD ./artefacts /tmp/artefacts
USER root
#Create directory where domain will be written to
......
......@@ -26,9 +26,17 @@ smp.datasource.jndi=jdbc/eDeliverySmpDs
smp.automation.authentication.external.tls.clientCert.enabled=true
log.folder=./logs/
smp.security.folder=${SMP_SECURITY_DIR}/
smp.keystore.filename=mp-keystore-docker-demo.p12
smp.keystore.type=PKCS12
smp.truststore.type=PKCS12
smp.truststore.password={DEC}{test123}
smp.keystore.password={DEC}{test123}
EOT
fi
echo "Copy SMP keystore : ${SMP_SECURITY_DIR}/smp-keystore-docker-demo.p12"
cp /tmp/artefacts/shared-artefacts/smp-keystore-docker-demo.p12 "${SMP_SECURITY_DIR}/smp-keystore-docker-demo.p12"
cp /u01/oracle/init/smp.war "${WL_DOMAIN_HOME}/"
ls -ltr "${WL_DOMAIN_HOME}/"
......
......@@ -4,6 +4,9 @@ smp.locale.folder=/data/smp/locales
smp.jdbc.hibernate.dialect=org.hibernate.dialect.Oracle10gDialect
smp.datasource.jndi=jdbc/eDeliverySmpDs
smp.automation.authentication.external.tls.clientCert.enabled=true
smp.keystore.filename=smp-keystore-docker-demo.p12
smp.keystore.type=PKCS12
smp.truststore.type=PKCS12
smp.truststore.password={DEC}{test123}
smp.keystore.password={DEC}{test123}
log.folder=./logs/
......@@ -111,7 +111,8 @@ insert into SMP_DOMAIN (ID, DOMAIN_CODE, VISIBILITY, SML_SUBDOMAIN, SML_SMP_ID,
(1, 'testdomain','PUBLIC', 'test-domain', 'CEF-SMP-002','sample_key','sample_key',1,0, sysdate, sysdate);
insert into SMP_GROUP (ID, FK_DOMAIN_ID, NAME, VISIBILITY, CREATED_ON, LAST_UPDATED_ON) values
(1, 1, 'test group', 'PUBLIC', sysdate, sysdate);
(1, 1, 'Group001', 'PUBLIC', sysdate, sysdate);
(2, 1, 'Group002', 'PUBLIC', sysdate, sysdate);
insert into SMP_EXTENSION ( ID, IDENTIFIER, IMPLEMENTATION_NAME, NAME, VERSION, DESCRIPTION, CREATED_ON, LAST_UPDATED_ON) values
......
......@@ -10,8 +10,6 @@
<!-- Only selected modules are deployed -->
<maven.deploy.skip>true</maven.deploy.skip>
<url>http://localhost:8080/smp</url>
<SMPAdminUser />
<SMPAdminPassword />
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<!-- the soap ui specific dependencies -->
......@@ -138,8 +136,7 @@
</property>
</soapuiProperties>
<testFailIgnore>true</testFailIgnore>
<projectFile>${basedir}/soapui/SMP4.0-Generic-soapui-project.xml
</projectFile>
<projectFile>${basedir}/soapui/SMP4.0-Generic-soapui-project.xml</projectFile>
<testSuite>PASSING_AUTO_BAMBOO</testSuite>
<!--If you want to execute single test case -->
<!-- testCase>SMP001-Create ServiceGroup-Basic Flow-Admin Service Group specified</testCase -->
......@@ -147,8 +144,6 @@
<!-- testCase>SMP022-Create ServiceMetadata-Basic Flow</testCase -->
<projectProperties>
<value>url=${url}</value>
<value>SMPAdminUser=${SMPAdminUser}</value>
<value>SMPAdminPassword=${SMPAdminPassword}</value>
</projectProperties>
</configuration>
<dependencies>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment