summaryrefslogtreecommitdiffstats
path: root/ms/generic-resource-api/src/main/resources/startGra.sh
diff options
context:
space:
mode:
authorDan Timoney <dtimoney@att.com>2020-08-12 11:23:28 -0400
committerDan Timoney <dtimoney@att.com>2020-08-13 16:09:14 -0400
commitd4a4318d15b9ad92fd46b35c125de8db6a5f689a (patch)
treee5c539055999cc01471a4fda8a33242a7825f8c3 /ms/generic-resource-api/src/main/resources/startGra.sh
parentadbe44c387bd2ff2ca0659345b1941735993ba0c (diff)
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 <dtimoney@att.com>
Diffstat (limited to 'ms/generic-resource-api/src/main/resources/startGra.sh')
-rw-r--r--ms/generic-resource-api/src/main/resources/startGra.sh11
1 files changed, 10 insertions, 1 deletions
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"