Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion grabdish/inventory-helidon/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ else
kubectl apply -f <(istioctl kube-inject -f $SCRIPT_DIR/inventory-helidon-deployment-$CURRENTTIME.yaml) -n msdataworkshop
fi

kubectl create -f inventory-service.yaml -n msdataworkshop
# kubectl create -f inventory-service.yaml -n msdataworkshop
2 changes: 1 addition & 1 deletion grabdish/inventory-helidon/undeploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ echo delete inventory-helidon deployment...

kubectl delete deployment inventory-helidon -n msdataworkshop

kubectl delete service inventory -n msdataworkshop
# kubectl delete service inventory -n msdataworkshop
4 changes: 2 additions & 2 deletions grabdish/utils/func-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ function addInventoryTest() {
# Show order and wait for status "no inventory"
placeOrderTest $ORDER_ID

sleep 5
sleep 10

showOrderTest $ORDER_ID 'failed inventory does not exist'

Expand All @@ -73,6 +73,6 @@ ORDER_ID=$(($ORDER_ID + 1))

placeOrderTest "$ORDER_ID"

sleep 5
sleep 10

showOrderTest "$ORDER_ID" 'success inventory exists'
8 changes: 4 additions & 4 deletions grabdish/utils/java-builds.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ BUILDS="frontend-helidon order-helidon supplier-helidon-se inventory-helidon"

# Provision Repos
while ! state_done JAVA_REPOS; do
for b in $BUILDS; do
for b in $BUILDS; do
oci artifacts container repository create --compartment-id "$(state_get COMPARTMENT_OCID)" --display-name "$(state_get RUN_NAME)/$b" --is-public true
done
state_set_done JAVA_REPOS
Expand Down Expand Up @@ -43,9 +43,9 @@ done

# Build all the images (no push) except frontend-helidon (requires Jaeger)
while ! state_done JAVA_BUILDS; do
for b in $BUILDS; do
for b in $BUILDS; do
cd $GRABDISH_HOME/$b
time ./build.sh
time ./build.sh &>> $GRABDISH_LOG/build-$b.log
done
state_set_done JAVA_BUILDS
done
done
2 changes: 1 addition & 1 deletion grabdish/utils/main-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -473,5 +473,5 @@ done

# Export state file for local development
cd $GRABDISH_HOME
rm ~/grabdish-state.tgz
rm -f ~/grabdish-state.tgz
tar -czf ~/grabdish-state.tgz state
31 changes: 31 additions & 0 deletions grabdish/utils/main-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,25 @@ export TEST_UI_PASSWORD=`kubectl get secret frontendadmin -n msdataworkshop --te
echo 'TEST_LOG: #####################################'

# WALKTHROUGH
echo "TEST_LOG: #### Testing Lab2: Walkthrough"

# Undeploy to make it rerunable
./undeploy.sh
SERVICES="inventory-python inventory-nodejs inventory-dotnet inventory-go inventory-helidon-se"
for s in $SERVICES; do
cd $GRABDISH_HOME/$s
./undeploy.sh || true
done

# Wait for Pods to stop
while test 0 -lt `kubectl get pods -n msdataworkshop | egrep 'frontend-helidon|inventory-|order-helidon|supplier-helidon-se' | wc -l`; do
echo "Waiting for pods to stop..."
sleep 10
done

# Deploy the java services
echo "TEST_LOG: #### Testing Lab2: Walkthrough"
cd $GRABDISH_HOME
./deploy.sh

while test 4 -gt `kubectl get pods -n msdataworkshop | egrep 'frontend-helidon|inventory-helidon|order-helidon|supplier-helidon-se' | grep "1/1" | wc -l`; do
Expand Down Expand Up @@ -57,6 +74,20 @@ else
exit
fi


# Delete all order (to make it rerunable)
function deleteallorders() {
echo '{"serviceName": "order", "commandName": "deleteallorders", "orderId": -1, "orderItem": "", "deliverTo": ""}'
}

if wget --http-user grabdish --http-password "$TEST_UI_PASSWORD" --no-check-certificate --post-data "$(deleteallorders)" \
--header='Content-Type: application/json' "$(state_get FRONTEND_URL)/placeorder" -O $GRABDISH_LOG/order; then
echo "TEST_LOG: $TEST_STEP deleteallorders succeeded"
else
echo "TEST_LOG_FAILED: $TEST_STEP deleteallorders failed"
fi


# Functional test on order 66/67
utils/func-test.sh Walkthrough 66

Expand Down
9 changes: 5 additions & 4 deletions grabdish/utils/non-java-builds.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ BUILDS="inventory-python inventory-nodejs inventory-dotnet inventory-go inventor

# Provision Repos
while ! state_done NON_JAVA_REPOS; do
for b in $BUILDS; do
for b in $BUILDS; do
oci artifacts container repository create --compartment-id "$(state_get COMPARTMENT_OCID)" --display-name "$(state_get RUN_NAME)/$b" --is-public true
done
state_set_done NON_JAVA_REPOS
Expand All @@ -32,9 +32,10 @@ done

# Build all the images (no push) except frontend-helidon (requires Jaeger)
while ! state_done NON_JAVA_BUILDS; do
for b in $BUILDS; do
for b in $BUILDS; do
cd $GRABDISH_HOME/$b
time ./build.sh
time ./build.sh &>> $GRABDISH_LOG/build-$b.log &
done
wait
state_set_done NON_JAVA_BUILDS
done
done