Skip to content

Commit

Permalink
refactored for present day formatting (#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
Montana committed Jul 13, 2023
1 parent c890dd9 commit e3d941d
Showing 1 changed file with 11 additions and 12 deletions.
23 changes: 11 additions & 12 deletions runTestScenarios.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ set -e
signalfile=$1

function orchestratorLog() {
now=`date -u +"%Y-%m-%dT%H:%M:%SZ"`
echo -e "[$now | Orchestrator | INFO] $1"
now=$(date -u +"%Y-%m-%dT%H:%M:%SZ")
echo -e "[$now | Orchestrator | INFO] $1"
}

function waitForSeconds() {
wait=$1
orchestratorLog "Waiting ${wait} seconds"
sleep $wait
wait=$1
orchestratorLog "Waiting ${wait} seconds"
sleep $wait
}

orchestratorLog "Orchestrator Started"
Expand All @@ -28,12 +28,12 @@ pushd scenarios
waitForSeconds 60

pushd industrial/gpsExample
./gpsExample.sh
./gpsExample.sh
popd
waitForSeconds 60

pushd industrial/salesSystem
./salesSystem.sh
./salesSystem.sh
popd
waitForSeconds 60

Expand Down Expand Up @@ -64,12 +64,11 @@ orchestratorLog "Scenario execution complete."
#orchestratorLog "Retrieving all blocks from the blockchain."
#./getAllBlocks.sh

if [ -z "${signalfile}" ];
then
orchestratorLog "No signal file defined."
if [ -z "${signalfile}" ]; then
orchestratorLog "No signal file defined."
else
orchestratorLog "Touching signal file ${signalfile}"
touch ${signalfile}
orchestratorLog "Touching signal file ${signalfile}"
touch ${signalfile}
fi

orchestratorLog "Done."

0 comments on commit e3d941d

Please sign in to comment.