Fix the csit test cases for refrepo

Change-Id: Ice3b2b4feea38a2bc8d98c9d27975523c44abcbf
Jira:VNFSDK-78
Signed-off-by: Murali <murali.p@huawei.com>
diff --git a/test/csit/plans/vnfsdk-refrepo/sanity-check/setup.sh b/test/csit/plans/vnfsdk-refrepo/sanity-check/setup.sh
index 91e931e..e04feac 100644
--- a/test/csit/plans/vnfsdk-refrepo/sanity-check/setup.sh
+++ b/test/csit/plans/vnfsdk-refrepo/sanity-check/setup.sh
@@ -17,9 +17,13 @@
 # These scripts are sourced by run-csit.sh.
 
 
+#Start postgres database
+docker run -d -i -t --name=postgres   -p 5432:5432 nexus3.onap.org:10001/onap/refrepo/postgres:latest
+
+POSTGRES=`docker inspect --format '{{ .NetworkSettings.IPAddress }}' postgres`
 
 #Start market place
-docker run -d -i -t --name=refrepo   -p 8702:8702 nexus3.onap.org:10001/onap/refrepo:1.0-STAGING-latest
+docker run -d -i -t --name=refrepo -e POSTGRES_IP=$POSTGRES  -p 8702:8702 nexus3.onap.org:10001/onap/refrepo:1.0-STAGING-latest
 
 # Wait for Market place initialization
 echo Wait for VNF Repository initialization
diff --git a/test/csit/plans/vnfsdk-refrepo/sanity-check/teardown.sh b/test/csit/plans/vnfsdk-refrepo/sanity-check/teardown.sh
index a426343..19440bc 100644
--- a/test/csit/plans/vnfsdk-refrepo/sanity-check/teardown.sh
+++ b/test/csit/plans/vnfsdk-refrepo/sanity-check/teardown.sh
@@ -18,4 +18,6 @@
 
 
 kill-instance.sh refrepo
+kill-instance.sh postgres
+