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
7 changes: 7 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
.git
node_modules
dist
.git
.idea
.vscode
.devcontainer
.github
ci-scripts
ui-tests-cy
cypress
integration-tests
problem
*.md
.env
.gitignore
.dockerignore
.prettierignore
.eslintignore
18 changes: 17 additions & 1 deletion .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,27 +26,43 @@ jobs:
UDN_NS: udn-test-ns

steps:
- name: Check CONSOLE_URL secret
id: check
env:
CONSOLE_URL: ${{ secrets.CONSOLE_URL }}
run: |
if [ -z "${CONSOLE_URL}" ]; then
echo "::notice::CONSOLE_URL secret is not configured; skipping E2E"
echo "run=false" >> "${GITHUB_OUTPUT}"
else
echo "run=true" >> "${GITHUB_OUTPUT}"
fi

- name: Checkout
if: steps.check.outputs.run == 'true'
uses: actions/checkout@v7
with:
persist-credentials: false

- name: Setup Node.js
if: steps.check.outputs.run == 'true'
uses: actions/setup-node@v7
with:
node-version: 22
cache: npm

- name: Install dependencies
if: steps.check.outputs.run == 'true'
run: |
npm clean-install --ignore-scripts --no-audit
npx cypress install

- name: Run E2E tests
if: steps.check.outputs.run == 'true'
run: npm run test-e2e

- name: Upload test artifacts
if: failure()
if: failure() && steps.check.outputs.run == 'true'
uses: actions/upload-artifact@v7
with:
name: e2e-results
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ yarn-error.log
ui-tests-cy/gui-test-screenshots/
ui-tests-cy/ci-hot-cluster-e2e/
.env
ui-tests-cy/ci-hot-cluster-e2e/
17 changes: 7 additions & 10 deletions ci-scripts/check-cluster-health.sh
Original file line number Diff line number Diff line change
Expand Up @@ -69,16 +69,13 @@ check "ARC listener pod" bash -c "
fi
"

check "default StorageClass" bash -c '
default_sc=$(oc get storageclass -o jsonpath="{.items[?(@.metadata.annotations.storageclass\.kubernetes\.io/is-default-class==\"true\")].metadata.name}" 2>/dev/null)
if [[ -n "${default_sc}" ]]; then
echo " Default StorageClass: ${default_sc}"
exit 0
else
echo " No default StorageClass found"
exit 1
fi
'
echo -n "Checking default StorageClass... "
default_sc=$(oc get storageclass -o jsonpath='{.items[?(@.metadata.annotations.storageclass\.kubernetes\.io/is-default-class=="true")].metadata.name}' 2>/dev/null)
if [[ -n "${default_sc}" ]]; then
echo "OK (${default_sc})"
else
echo "WARN (none found — not required for networking tests)"
fi

check "console route accessible" bash -c '
console_url=$(oc get consoles.config.openshift.io cluster -o jsonpath="{.status.consoleURL}" 2>/dev/null)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ metadata:
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: {{ .Release.Name }}-console
name: cluster-admin
subjects:
- kind: ServiceAccount
name: {{ include "ci-test-stack.consoleSAName" . }}
Expand Down
18 changes: 0 additions & 18 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

56 changes: 34 additions & 22 deletions ui-tests-cy/MIGRATION.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# E2E Test Migration Log

**Epic:** [CNV-87983](https://redhat.atlassian.net/browse/CNV-87983)
**Epic:** [OCPNETUI-56](https://redhat.atlassian.net/browse/OCPNETUI-56)
**Started:** 2026-06-02

## Progress
Expand All @@ -9,21 +9,21 @@

- Analyzed kubevirt-ui `release-4.21` (Cypress source) and `main` (Playwright reference)
- Cypress tests removed from kubevirt-ui `main` — Playwright is the only remaining version
- The `release-4.21` Cypress tests are the primary copy source (did not differ much from main)
- The `release-4.21` Cypress tests are the primary copy source
- Classified tests by plugin ownership:
- **networking-console-plugin**: NADs, UDNs, NetworkPolicies, Services, Routes, Ingresses (~14 tests)
- **nmstate-console-plugin**: NNCPs, NNS, Physical networks, VM networks
- **kubevirt-plugin**: VM-dependent tests (stay in kubevirt-ui with API-based setup)
- Plan saved to `ui/PLAN.md`
- Plan saved to `ui-tests-cy/PLAN.md`

### 2026-06-02 — Cypress infrastructure and specs created

Created support structure:
Created support structure under `ui-tests-cy/`:

- `support/selectors.ts` — `cy.byTestID()`, `cy.byButtonText()`, `cy.checkTitle()`, `cy.clickNavLink()`, etc.
- `support/commands.ts` — `cy.deleteResource()`, `cy.beforeSpec()`, `cy.switchProject()`, `cy.setupUdnNamespace()`
- `support/commands.ts` — `cy.deleteResource()` (via `cy.task`), `cy.switchProject()`
- `support/nav.ts` — `cy.visitNAD()`, `cy.visitUDN()`, `cy.visitService()`
- `support/index.ts` — updated to import all new support files
- `support/index.ts` — imports all support files, filters known console uncaught exceptions

Created views:

Expand All @@ -34,26 +34,38 @@ Created views:

Created utils:

- `utils/const/index.ts` — `TEST_NS`, `UDN_NS`, `K8S_KIND`, `adminOnlyDescribe`
- `utils/const/base.ts` — `TEST_NS`, `UDN_NS`, `MINUTE`, `SECOND`
- `utils/const/nad.ts` — `NAD_BRIDGE`, `NAD_OVN`, `NAD_LOCALNET`
- `utils/const/scale.ts` — `MINUTE`, `SECOND`
- `utils/types/nad.ts` — `NadData` interface
- `utils/types/nad.ts` — `NadData` type

Created specs (8 files, ~14 test cases):
Created specs (10 files):

- `tests/nad-bridge.cy.ts` — create bridge NAD (CNV-3256)
- `tests/nad-localnet.cy.ts` — create + delete localnet NAD (CNV-3256, CNV-4288)
- `tests/nad-ovn.cy.ts` — create L2 overlay NAD (CNV-3256)
- `tests/udn.cy.ts` — create UDN (CNV-11867), create CUDN (CNV-11871), delete CUDN (CNV-11874)
- `tests/net-policies.cy.ts` — visit page, create NetworkPolicy with form
- `tests/services.cy.ts` — visit page, create Service with YAML
- `tests/routes.cy.ts` — visit page, create Route with form
- `tests/ingresses.cy.ts` — visit page, create Ingress with YAML
- `tests/setup/login.cy.ts` — login verification
- `tests/setup/visit-pages.cy.ts` — page navigation checks
- `tests/networking/nad-bridge.cy.ts` — create bridge NAD
- `tests/networking/nad-localnet.cy.ts` — create + delete localnet NAD
- `tests/networking/nad-ovn.cy.ts` — create L2 overlay NAD
- `tests/networking/udn.cy.ts` — create UDN, create CUDN, delete CUDN
- `tests/networking/net-policies.cy.ts` — create NetworkPolicy with form
- `tests/networking/services.cy.ts` — create Service with YAML
- `tests/networking/routes.cy.ts` — create Route with form
- `tests/networking/ingresses.cy.ts` — create Ingress with YAML

Removed: `tests/example-page.cy.ts` (template placeholder)
### 2026-08-12 — Hot-cluster CI infrastructure

Added CI infrastructure adapted from kubevirt-plugin (CNV-74265):

- CI scripts: health checks, console/plugin startup, test cleanup, nginx configs
- Helm charts: `ci-test-stack` (console + plugin pods), `ci-env-controller` (lifecycle management)
- GitHub Actions: `hot-cluster-e2e.yml` + `hot-cluster-e2e-run.yml` workflows
- Composite actions: `ci-env-request` / `ci-env-release` for test environment lifecycle
- `Dockerfile.ci` with public UBI9 base images for GitHub Actions builds
- FIPS cluster workarounds (`GOLANG_FIPS=0`, `OPENSSL_FORCE_FIPS_MODE=0`)

### Next steps

- [ ] Set up GitHub Actions hot-cluster CI
- [ ] Verify Prow integration works
- [ ] Update Jira epic CNV-87983
- [ ] Prepare and validate hot cluster (see `ui-tests-cy/CLUSTER.md`)
- [ ] Run full E2E suite on hot cluster via GitHub Actions
- [ ] Audit data-test IDs for PatternFly 6 compatibility
- [ ] Consider building plugin image via CNO instead of dev mode
- [ ] Add CNO version compatibility check
Loading
Loading