What tests are doing:
- Create the infra stack ( GCP runner, cert-manager, rancher )
- Install the Turtles operator with locally built latest chart
- Deploy the Turtles UI extension
- Test the Turtles menu, namespaces import features
- Perform CAPI setup prerequisites
- Create & Import CAPI cluster using fleet by cluster, namespace annotation
- Install App on imported CAPI cluster
- Scale the imported CAPI cluster
- Remove & Delete the imported CAPI cluster
- Install Rancher.
- Install Rancher Turtles operator.
- Install CAPI UI Extensions.
cd tests/cypress/latest
- Install Cypress and its dependencies:
npm install
- Export the following ENV VAR:
RANCHER_URL
(format:<FQDN>/dashboard
),RANCHER_PASSWORD
,RANCHER_USER
,CYPRESS_TAGS=main
, and provider specific env var:- CAPA -
AWS_ACCESS_KEY_ID
andAWS_SECRET_ACCESS_KEY
- CAPG -
GCP_CREDENTIALS
- CAPZ -
AZURE_TENANT_ID
,AZURE_CLIENT_ID
,AZURE_CLIENT_SECRET
,AZURE_SUBSCRIPTION_ID
, andAZURE_LOCATION
.
- CAPA -
- Start Cypress:
./node_modules/cypress/bin/cypress open -C cypress.config.ts
The Cypress GUI should now be visible.
Currently, we divide our tests by tags (short
, full
,...). Aside of this we have an initial one, install
.
Specs with short
tag are local (docker) based tests and with full
tag are cloud providers based tests.
We have implemented tags for more precise selection of tests using a Cypress pluging called cypress-grep
Note: the title can be either at describe
, context
or it
level.
By default, daily runs will run test with the tags@install
, @short
To use locally use the tag --env grepTags=tag
along with the npx command
For example:
npx cypress run -C cypress.config.ts --env grepTags="@short" cypress/e2e/unit_tests/*.spec.ts