Uploaded image for project: 'OpenShift Service Mesh'
  1. OpenShift Service Mesh
  2. OSSM-4049

Refactor "install demo apps" scripts into the Cypress suite



    • Epic
    • Resolution: Done
    • Major
    • None
    • OSSM 2.5.0
    • Kiali, User Experience
    • None
    • False
    • None
    • False
    • 0
    • 0% 0%


      The goal of this is to make the Cypress suite more self-contained by letting it detect if demo apps are installed and ready. If they are not present, they will be installed before running any Cypress test. We want to make the suite less dependent to the hack scripts. This will also help when it comes to the parallel execution.


      Note: this may cause some suite inconsistencies related to different environments, but we are willing to take that risk.


      The same approach was already used when it comes to the Gateway API setup:


      This ticket is about detecting whether the specific app pod is ready to use.

      There was also a request related to detecting generated traffic, but I'll cover that in a separate issue.


      currently we install:


      bookinfo app (bookinfo namespace) https://github.com/kiali/kiali/blob/d62bf6ee96b3abfc29989b4c37f31009e3d3472d/hack/istio/install-testing-demos.sh#LL161C5-L161C118


      "${SCRIPT_DIR}/install-bookinfo-demo.sh" -c kubectl -mp ${MINIKUBE_PROFILE} -tg -in ${ISTIO_NAMESPACE} -a ${ARCH} 


      error rates (alpha and beta namespaces) https://github.com/kiali/kiali/blob/d62bf6ee96b3abfc29989b4c37f31009e3d3472d/hack/istio/install-testing-demos.sh#L157

      "${SCRIPT_DIR}/install-error-rates-demo.sh" -c kubectl -in ${ISTIO_NAMESPACE} -a ${ARCH}



      sleep app (sleep namespace) https://github.com/kiali/kiali/blob/master/hack/istio/install-testing-demos.sh#L14



      With mentioned above, we should call those scripts directly from cypress as pre test condition. 
      MVP here will be (I think) have install error rates and bookinfo scripts executed in parallel thru the cypress itself. To achieve that, we need to do some adjustments in shell scripts.

      In this case, the scripts executed from cypress will do setup on all available environments (maistra vs istio) - therefore there is no need to implement this logic into cypress itself.
      Currently scripts have some "test condition" that all apps are deployed OK, we might extend / reinforce that in shell scripts.
      We can also add additional check into cypress itself after executing shell script - i.e.:

      • cypress executes install-error-rates-demo.sh
      • it verify that  alpha and beta namespaces are present in UI




        Issue Links



              rh-ee-mnesuta Matej Nesuta
              rh-ee-mnesuta Matej Nesuta
              0 Vote for this issue
              2 Start watching this issue