Skip to content

Commit

Permalink
refactor start_test.sh
Browse files Browse the repository at this point in the history
Signed-off-by: itamar <itc404@gmail.com>
  • Loading branch information
itamarco committed May 24, 2020
1 parent 714aa3d commit 9db40ab
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions start_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ then
exit
fi

jmx="$1"
[ -n "$jmx" ] || read -p 'Enter path to the jmx file ' jmx
jmx="$2"
[ -n "$jmx" ] || read -p 'Enter path to the jmx file:' jmx

if [ ! -f "$jmx" ];
then
Expand All @@ -33,6 +33,7 @@ fi

test_name="$(basename "$jmx")"


#Get Master pod details

master_pod=`kubectl -n $namespace get po | grep jmeter-master | awk '{print $1}'`
Expand All @@ -41,4 +42,4 @@ kubectl -n $namespace cp "$jmx" "$master_pod:/$test_name"

## Echo Starting Jmeter load test

kubectl -n $namespace exec -ti $master_pod -- /bin/bash /load_test "$test_name"
kubectl -n $namespace exec -ti $master_pod -- /bin/bash /load_test "$test_name"

0 comments on commit 9db40ab

Please sign in to comment.