Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,11 @@ Set the following var to use custom Distributed Tracing UI plugin image. The ima
export CYPRESS_DT_CONSOLE_IMAGE=<console image>
```

Set the following var to specify a custom namespace for the Cluster Observability Operator installation. If not set, defaults to `openshift-cluster-observability-operator`.
```bash
export CYPRESS_COO_NAMESPACE=<custom-namespace>
```

### Start Cypress
We can either open Cypress GUI(open) or run Cypress in headless mode(run) to run the tests.
```bash
Expand Down
10 changes: 8 additions & 2 deletions tests/e2e/dt-plugin-tests.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { operatorHubPage } from '../views/operator-hub-page';

// Set constants for the operators that need to be installed for tests.
const DTP = {
namespace: 'openshift-cluster-observability-operator',
namespace: Cypress.env('COO_NAMESPACE') || 'openshift-cluster-observability-operator',
packageName: 'cluster-observability-operator',
operatorName: 'Cluster Observability Operator',
config: {
Expand Down Expand Up @@ -99,7 +99,13 @@ describe('OpenShift Distributed Tracing UI Plugin tests', () => {
} else if (Cypress.env('COO_UI_INSTALL')) {
cy.log('COO_UI_INSTALL is set. COO, Tempo and OpenTelemetry operators will be installed from redhat-operators catalog source');
cy.log('Install Cluster Observability Operator');
operatorHubPage.installOperator(DTP.packageName, 'redhat-operators');
if (Cypress.env('COO_NAMESPACE')) {
cy.log(`Using custom namespace: ${Cypress.env('COO_NAMESPACE')}`);
operatorHubPage.installOperator(DTP.packageName, 'redhat-operators', Cypress.env('COO_NAMESPACE'));
} else {
cy.log('Using recommended namespace installation');
operatorHubPage.installOperator(DTP.packageName, 'redhat-operators');
}
cy.get('.co-clusterserviceversion-install__heading', { timeout: 5 * 60 * 1000 }).should(($el) => {
const text = $el.text();
expect(text).to.satisfy((t) =>
Expand Down
Loading