VOL-1057: Test Case: ONU discovery
Reverse previous solution to use onos from repo with encryption disabled and use new
voltha-apps charts to load onos-apps
Instead, wtih onos encryption disabled as the outcome of VOL-1343,
the original case where we use all locally built voltha images including onos
will now work

Change-Id: I3f5ac9e511e33cca0eee53f8d8fae53819586354
diff --git a/tests/atests/build/Makefile b/tests/atests/build/Makefile
index 0041222..f18c6c2 100644
--- a/tests/atests/build/Makefile
+++ b/tests/atests/build/Makefile
@@ -125,9 +125,16 @@
 	done
 	rm /tmp/pon0_group_fwd_mask
 	touch $@
-
+	
 $(M)/voltha_ponsim_running: | $(M)/pon0_fwd
 	$(HOME)/cord/helm-charts/scripts/wait_for_pods.sh
+	until http -a karaf:karaf --ignore-stdin --check-status GET http://127.0.0.1:30120/onos/v1/configuration/org.opencord.olt.impl.Olt; \
+	do \
+		sleep 5; \
+	done
+	http -a karaf:karaf --ignore-stdin POST http://127.0.0.1:30120/onos/v1/configuration/org.opencord.olt.impl.Olt defaultVlan=65535
+	timeout 1m bash -c "until http GET http://127.0.0.1:30125/health|jq '.state'|grep -q HEALTHY; do echo 'Waiting for VOLTHA to be HEALTHY'; sleep 10; done"
+	echo "[passed] VOLTHA is HEALTHY"
 	touch $@
 	echo "Voltha Test Framework Ready!"
 
@@ -153,7 +160,7 @@
 
 remove-chart-milestones:
 	cd $(M); sudo rm -f setup kafka kafka-running onos voltha etcd-operator-ready etcd-cluster \
-		pon0_fwd voltha-running ponsim voltha_ponsim_running
+		voltha-running ponsim pon0_fwd voltha_ponsim_running
 remove-kube-milestones:
 	cd $(M); sudo rm -f kubeadm helm-init