INNER CODE UNIT · Go
main
openservicemesh/osm · ci/cmd/maestro.go:62
func main() {
log.Debug().Msgf("Looking for: %s/%s, %s/%s, %s/%s, %s/%s %s/%s", bookBuyerLabel, bookbuyerNS, bookThiefLabel, bookthiefNS, bookstoreLabel, bookstoreNS, bookWarehouseLabel, bookWarehouseNS, mySQLLabel, bookWarehouseNS)
kubeClient := maestro.GetKubernetesClient()
bookBuyerPodName, bookThiefPodName, bookWarehousePodName, osmControllerPodName := getPodNames(kubeClient)
// Tail the logs of the pods participating in the service mesh concurrently and watch for success or failure.
didItSucceed := func(ns, podName, label string) chan string {
result := make(chan string)
maestro.SearchLogsForSuccess(kubeClient, ns, podName, label, maxWaitForOK(), result, common.Success, common.Failure)
return result
}
// When both pods return success - easy - we are good to go! CI passed!
allTestsResults := osmStrings.All{
<-didItSucceed(bookbuyerNS, bookBuyerPodName, bookBuyerLabel),
<-didItSucceed(bookthiefNS, bookThiefPodName, bookThiefLabel),