aboutsummaryrefslogtreecommitdiffstats
path: root/plans/dcaegen2-collectors-datafile/ManagementInterface-suite/setup.sh
diff options
context:
space:
mode:
authorMariusz Wagner <mariusz.wagner@nokia.com>2019-03-14 08:07:32 +0000
committerGerrit Code Review <gerrit@onap.org>2019-03-14 08:07:32 +0000
commitabeb9748bbf4c68b20381e84aeeee1e52b9ff623 (patch)
tree5a39b1ffc8e6ec970f4582ff0ddaeef4b6bb81c7 /plans/dcaegen2-collectors-datafile/ManagementInterface-suite/setup.sh
parent1c31dc81825328355b86c155f4d13067a1cd4214 (diff)
parentc4c62f25419e3ac3e660117600eb9ed06c8f2be2 (diff)
Merge "Added DataFile plans and tests"
Diffstat (limited to 'plans/dcaegen2-collectors-datafile/ManagementInterface-suite/setup.sh')
-rw-r--r--plans/dcaegen2-collectors-datafile/ManagementInterface-suite/setup.sh31
1 files changed, 31 insertions, 0 deletions
diff --git a/plans/dcaegen2-collectors-datafile/ManagementInterface-suite/setup.sh b/plans/dcaegen2-collectors-datafile/ManagementInterface-suite/setup.sh
new file mode 100644
index 00000000..af24717a
--- /dev/null
+++ b/plans/dcaegen2-collectors-datafile/ManagementInterface-suite/setup.sh
@@ -0,0 +1,31 @@
+#!/usr/bin/env bash
+
+docker-compose up -d
+
+
+DFC=$(docker ps -a -q --filter="name=dfc")
+
+# Wait for initialization of Docker contaienr for DFC
+for i in {1..10}; do
+if [ $(docker inspect --format '{{ .State.Running }}' $DFC) ]
+then
+ echo "DFC Container Running"
+ break
+else
+ echo sleep $i
+ sleep $i
+fi
+done
+
+#Wait for initialization of the DFC service
+for i in {1..10}; do
+if [ $(curl -so /dev/null -w '%{response_code}' http://localhost:8100/heartbeat ) -eq 200 ]
+then
+ echo "DFC Service running"
+ break
+else
+ echo sleep $i
+ sleep $i
+fi
+done
+