From 35c45d5c524bf83375fab7b9483835d43b69a5a6 Mon Sep 17 00:00:00 2001 From: zhihui wu Date: Tue, 25 Jul 2017 17:37:39 +0800 Subject: run storperf test by using these scripts Local test with apex is OK. JIRA:QTIP-248 Change-Id: I47c55ddd88f9722ce83b73a4d7ec91ece2aab2ed Signed-off-by: zhihui wu --- integration/storperf/storperf_docker.sh | 35 +++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100755 integration/storperf/storperf_docker.sh (limited to 'integration/storperf/storperf_docker.sh') diff --git a/integration/storperf/storperf_docker.sh b/integration/storperf/storperf_docker.sh new file mode 100755 index 00000000..629a4edb --- /dev/null +++ b/integration/storperf/storperf_docker.sh @@ -0,0 +1,35 @@ +#! /bin/bash +############################################################################## +# Copyright (c) 2017 ZTE and others. +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## + +clean_storperf_container() +{ + docker-compose -f storperf-docker-compose.yaml down + + for container_name in storperf storperf-master storperf-swaggerui storperf-httpfrontend storperf-reporting + do + container=`docker ps -a -q -f name=$container_name` + if [[ ! -z $container ]];then + echo "Stopping any existing $container_name container" + docker rm -fv $container + fi + done +} + + +launch_storperf_container() +{ + docker-compose -f storperf-docker-compose.yaml up -d + + echo "Waiting for StorPerf to become active" + + while [ $(curl -s -o /dev/null -I -w "%{http_code}" -X GET http://127.0.0.1:5000/api/v1.0/configurations) != "200" ] + do + sleep 1 + done +} \ No newline at end of file -- cgit 1.2.3-korg