From d4a4318d15b9ad92fd46b35c125de8db6a5f689a Mon Sep 17 00:00:00 2001 From: Dan Timoney Date: Wed, 12 Aug 2020 11:23:28 -0400 Subject: Fix test issues Added property settings to all test cases to correct issue in staging build, where properties do not appear to be taking place properly. Also, fixed issues found in testing with docker compose. Change-Id: If698e212d91cd630af4c4a33dd70d90078923478 Issue-ID: SDNC-1315 Signed-off-by: Dan Timoney --- ms/generic-resource-api/src/main/resources/startGra.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'ms/generic-resource-api/src/main/resources/startGra.sh') diff --git a/ms/generic-resource-api/src/main/resources/startGra.sh b/ms/generic-resource-api/src/main/resources/startGra.sh index 5f04e33..b29eb7f 100644 --- a/ms/generic-resource-api/src/main/resources/startGra.sh +++ b/ms/generic-resource-api/src/main/resources/startGra.sh @@ -54,7 +54,16 @@ echo -e "\nDatabase ready" #END # Initialize schema -#mysql -h ${MYSQL_DB_HOST} -u ${MYSQL_DB_USER} -p${MYSQL_DB_PASSWD} ${MYSQL_DB_DATABASE} < ${SDNC_HOME}/config/schema.sql +if [ -f ${SDNC_CONFIG_DIR}/schema-mysql.sql ] +then + mysql -h ${MYSQL_DB_HOST} -u ${MYSQL_DB_USER} -p${MYSQL_DB_PASSWD} ${MYSQL_DB_DATABASE} < ${SDNC_CONFIG_DIR}/schema-mysql.sql +fi + +# Load data +if [ -f ${SDNC_CONFIG_DIR}/data-mysql.sql ] +then + mysql -h ${MYSQL_DB_HOST} -u ${MYSQL_DB_USER} -p${MYSQL_DB_PASSWD} ${MYSQL_DB_DATABASE} < ${SDNC_CONFIG_DIR}/data-mysql.sql +fi if [ ! -f ${SDNC_CERT_DIR}/${TRUSTSTORE} ]; then echo "${SDNC_CERT_DIR}/${TRUSTSTORE} not found ... cannot install ONAP CA certs" -- cgit 1.2.3-korg