#!/bin/sh
#
#
#
# Step 1 - Variables
PROJECT_NAME_PREFIX="rh-mock-test-"
 

# Step 2 - Create an Empty Space
END=1
for i in $(seq 1 $END); do
curl -u "bpmsAdmin:admin12@" -H  "accept: application/json" -H 'Content-Type: application/json' -X POST "http://localhost:8080/business-central/rest/spaces/" -d '{"name":"TestSpace_001", "owner":"bpmsAdmin", "description":" Test Space Description", "defaultGroupId":"com.sample"}'
echo ""
done


# Step 3 - Create an Empty project
END=35
for i in $(seq 1 $END); do
PROJECT_NAME=$(printf ${PROJECT_NAME_PREFIX}%03d $i)
curl -u "bpmsAdmin:admin12@"  -H  "accept: application/json" -H 'Content-Type: application/json' -X POST "http://localhost:8080/business-central/rest/spaces/TestSpace_001/projects" -d '{"name":"'"$PROJECT_NAME"'", "description": "A Test Project", "groupId":"com.sample", "version":"1.0-SNAPSHOT" }'
 
#sleep 5s
done
#
# EOF

