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
error rates (alpha and beta namespaces) https://github.com/kiali/kiali/blob/d62bf6ee96b3abfc29989b4c37f31009e3d3472d/hack/istio/install-testing-demos.sh#L157
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