https://issues.redhat.com/browse/NETOBSERV-32 https://issues.redhat.com/browse/NETOBSERV-106 *launched clusters with PRs and networkType=SDN launch 4.10.0-0.nightly,openshift/console#10640,openshift/cluster-network-operator#1251 $ oc describe cm/openshift-network-features -n openshift-config-managed Name: openshift-network-features Namespace: openshift-config-managed Labels: Annotations: openshift.io/description: Exposes available network features as required by the Console in order to show or hide some form fields. If the map or a given property is undefined, the Console won't throw error and will take a default action (show, hide, show with a warning... Data ==== policy_egress: ---- true policy_peer_ipblock_exceptions: ---- true BinaryData ==== Events: $ oc get Network.config.openshift.io cluster -o json | jq '.spec.networkType' "OpenShiftSDN" *verified egress and IP block exceptions are now visible for SDN networkType: *updated automation tests for console to run all tests for OCP cluster with SDN network: $ ./node_modules/cypress/bin/cypress run --spec tests/netobserv/networkpolicy_form.spec.ts ==================================================================================================== (Run Starting) ┌────────────────────────────────────────────────────────────────────────────────────────────────┐ │ Cypress: 6.9.1 │ │ Browser: Electron 87 (headless) │ │ Specs: 1 found (netobserv/networkpolicy_form.spec.ts) │ │ Searched: tests/netobserv/networkpolicy_form.spec.ts │ └────────────────────────────────────────────────────────────────────────────────────────────────┘ ──────────────────────────────────────────────────────────────────────────────────────────────────── Running: netobserv/networkpolicy_form.spec.ts (1 of 1) Logging in as kubeadmin create project create project create project Console Network Policies form tests (OCP-41858, OCP-45303, NETOBSERV) UI validating tests ✓ should validate network policy form (OCP-41858) (75871ms) create project delete project ✓ should show affected pods, (OCP-45303) (19547ms) network policy end-to-end tests (OCP-41858) ingress policies tests ✓ ingress: should verify deny all (28931ms) ✓ ingress: should allow pods from the same NS (25264ms) ✓ ingress: should allow pods from different NS (21410ms) ✓ ingress: should validate peers by IP block (19049ms) egress policies tests ✓ egress: should verify deny all (11577ms) ✓ egress: should allow traffic to pods in the same namespace (20562ms) ✓ egress: should allow traffic to different NS (20879ms) delete project delete project delete project Logging out ✓ egress: should allow traffic to peers by CIDR (22256ms) 10 passing (5m) [mochawesome] Report JSON saved to /Users/memodi/workspaces/repos/openshift-tests-private/frontend/gui_test_screenshots/cypress_report_009.json (Results) ┌────────────────────────────────────────────────────────────────────────────────────────────────┐ │ Tests: 10 │ │ Passing: 10 │ │ Failing: 0 │ │ Pending: 0 │ │ Skipped: 0 │ │ Screenshots: 0 │ │ Video: true │ │ Duration: 5 minutes, 19 seconds │ │ Spec Ran: netobserv/networkpolicy_form.spec.ts │ └────────────────────────────────────────────────────────────────────────────────────────────────┘ (Video) - Started processing: Compressing to 32 CRF Compression progress: 69% - Finished processing: /Users/memodi/workspaces/repos/openshift-tests-private/fron (16 seconds) tend/gui_test_screenshots/cypress/videos/netobserv/networkp olicy_form.spec.ts.mp4 ==================================================================================================== (Run Finished) Spec Tests Passing Failing Pending Skipped ┌────────────────────────────────────────────────────────────────────────────────────────────────┐ │ ✔ netobserv/networkpolicy_form.spec.t 05:19 10 10 - - - │ │ s │ └────────────────────────────────────────────────────────────────────────────────────────────────┘ ✔ All specs passed! 05:19 10 10 - - - * Ran same tests for cluster with OVN network as well. All tests passes for OVN and SDN cluster type. *Also verified manually, by configuring non-admin user, no special alert is seen on NetworkPolicy form page. * added code in existing netobserv-console automation code to verify egress UI fields and removing restrictions for egress tests to run only for OVN. Now it could run for both OVN and SDN. Running for SDN cluster: $ ./node_modules/cypress/bin/cypress run --spec tests/netobserv/networkpolicy_form.spec.ts ==================================================================================================== (Run Starting) ┌────────────────────────────────────────────────────────────────────────────────────────────────┐ │ Cypress: 6.9.1 │ │ Browser: Electron 87 (headless) │ │ Specs: 1 found (netobserv/networkpolicy_form.spec.ts) │ │ Searched: tests/netobserv/networkpolicy_form.spec.ts │ └────────────────────────────────────────────────────────────────────────────────────────────────┘ ──────────────────────────────────────────────────────────────────────────────────────────────────── Running: netobserv/networkpolicy_form.spec.ts (1 of 1) Logging in as kubeadmin create project create project 1) "before all" hook: root-level: any test suite for "should validate network policy form (OCP-41858)" 0 passing (52s) 1 failing 1) Console Network Policies form tests (OCP-41858, OCP-45303, NETOBSERV) UI validating tests "before all" hook: root-level: any test suite for "should validate network policy form (OCP-41858)": AssertionError: Timed out retrying after 30000ms: Expected not to exist in the DOM, but it was continuously found. Because this error occurred during a `before all` hook we are skipping all of the remaining tests. Although you have test retries enabled, we do not retry tests when `before all` or `after all` hooks fail at Object.shouldBeClosed (https://console-openshift-console.apps.ci-ln-phblrt2-72292.origin-ci-int-gce.dev.rhcloud.com/__cypress/tests?p=tests/netobserv/networkpolicy_form.spec.ts:13829:68) at Context.eval (https://console-openshift-console.apps.ci-ln-phblrt2-72292.origin-ci-int-gce.dev.rhcloud.com/__cypress/tests?p=tests/netobserv/networkpolicy_form.spec.ts:13515:56) [mochawesome] Report JSON saved to /Users/memodi/workspaces/repos/openshift-tests-private/frontend/gui_test_screenshots/cypress_report_014.json (Results) ┌────────────────────────────────────────────────────────────────────────────────────────────────┐ │ Tests: 10 │ │ Passing: 0 │ │ Failing: 1 │ │ Pending: 0 │ │ Skipped: 9 │ │ Screenshots: 1 │ │ Video: true │ │ Duration: 51 seconds │ │ Spec Ran: netobserv/networkpolicy_form.spec.ts │ └────────────────────────────────────────────────────────────────────────────────────────────────┘ (Screenshots) - /Users/memodi/workspaces/repos/openshift-tests-private/frontend/gui_test_screens (1280x720) hots/cypress/screenshots/netobserv/networkpolicy_form.spec.ts/should validate ne twork policy form (OCP-41858) -- before all hook root-level any test suite (fail ed).png (Video) - Started processing: Compressing to 32 CRF - Finished processing: /Users/memodi/workspaces/repos/openshift-tests-private/fron (4 seconds) tend/gui_test_screenshots/cypress/videos/netobserv/networkp olicy_form.spec.ts.mp4 ==================================================================================================== (Run Finished) Spec Tests Passing Failing Pending Skipped ┌────────────────────────────────────────────────────────────────────────────────────────────────┐ │ ✖ netobserv/networkpolicy_form.spec.t 00:51 10 - 1 - 9 │ │ s │ └────────────────────────────────────────────────────────────────────────────────────────────────┘ ✖ 1 of 1 failed (100%) 00:51 10 - 1 - 9 memodi@memodi-mac:/Users/memodi/workspaces/repos/openshift-tests-private/frontend (NETOBSERV-32 *=) $ oc dele ^R memodi@memodi-mac:/Users/memodi/workspaces/repos/openshift-tests-private/frontend (NETOBSERV-32 *=) $ oc delete project test0 test1 test2 project.project.openshift.io "test0" deleted project.project.openshift.io "test1" deleted project.project.openshift.io "test2" deleted memodi@memodi-mac:/Users/memodi/workspaces/repos/openshift-tests-private/frontend (NETOBSERV-32 *=) $ ./node_modules/cypress/bin/cypress run --spec tests/netobserv/networkpolicy_form.spec.ts ==================================================================================================== (Run Starting) ┌────────────────────────────────────────────────────────────────────────────────────────────────┐ │ Cypress: 6.9.1 │ │ Browser: Electron 87 (headless) │ │ Specs: 1 found (netobserv/networkpolicy_form.spec.ts) │ │ Searched: tests/netobserv/networkpolicy_form.spec.ts │ └────────────────────────────────────────────────────────────────────────────────────────────────┘ ──────────────────────────────────────────────────────────────────────────────────────────────────── Running: netobserv/networkpolicy_form.spec.ts (1 of 1) Logging in as kubeadmin create project create project create project Console Network Policies form tests (OCP-41858, OCP-45303, NETOBSERV) UI validating tests ✓ should validate network policy form (OCP-41858) (58547ms) create project delete project ✓ should show affected pods, (OCP-45303) (22236ms) network policy end-to-end tests (OCP-41858) ingress policies tests ✓ ingress: should verify deny all (28529ms) ✓ ingress: should allow pods from the same NS (26158ms) ✓ ingress: should allow pods from different NS (25110ms) ✓ ingress: should validate peers by IP block (19758ms) egress policies tests ✓ egress: should verify deny all (11566ms) ✓ egress: should allow traffic to pods in the same namespace (20940ms) ✓ egress: should allow traffic to different NS (20831ms) delete project delete project delete project Logging out ✓ egress: should allow traffic to peers by CIDR (20771ms) 10 passing (5m) [mochawesome] Report JSON saved to /Users/memodi/workspaces/repos/openshift-tests-private/frontend/gui_test_screenshots/cypress_report_015.json (Results) ┌────────────────────────────────────────────────────────────────────────────────────────────────┐ │ Tests: 10 │ │ Passing: 10 │ │ Failing: 0 │ │ Pending: 0 │ │ Skipped: 0 │ │ Screenshots: 0 │ │ Video: true │ │ Duration: 5 minutes, 10 seconds │ │ Spec Ran: netobserv/networkpolicy_form.spec.ts │ └────────────────────────────────────────────────────────────────────────────────────────────────┘ (Video) - Started processing: Compressing to 32 CRF Compression progress: 56% - Finished processing: /Users/memodi/workspaces/repos/openshift-tests-private/fron (20 seconds) tend/gui_test_screenshots/cypress/videos/netobserv/networkp olicy_form.spec.ts.mp4 Compression progress: 100% ==================================================================================================== (Run Finished) Spec Tests Passing Failing Pending Skipped ┌────────────────────────────────────────────────────────────────────────────────────────────────┐ │ ✔ netobserv/networkpolicy_form.spec.t 05:10 10 10 - - - │ │ s │ └────────────────────────────────────────────────────────────────────────────────────────────────┘ ✔ All specs passed! 05:10 10 10 - - - $ ./node_modules/cypress/bin/cypress run --spec tests/netobserv/networkpolicy_form.spec.ts ==================================================================================================== (Run Starting) ┌────────────────────────────────────────────────────────────────────────────────────────────────┐ │ Cypress: 6.9.1 │ │ Browser: Electron 87 (headless) │ │ Specs: 1 found (netobserv/networkpolicy_form.spec.ts) │ │ Searched: tests/netobserv/networkpolicy_form.spec.ts │ └────────────────────────────────────────────────────────────────────────────────────────────────┘ ──────────────────────────────────────────────────────────────────────────────────────────────────── Running: netobserv/networkpolicy_form.spec.ts (1 of 1) Logging in as kubeadmin create project create project create project Console Network Policies form tests (OCP-41858, OCP-45303, NETOBSERV) UI validating tests ✓ should validate network policy form (OCP-41858) (62597ms) create project delete project ✓ should show affected pods, (OCP-45303) (19457ms) network policy end-to-end tests (OCP-41858) ingress policies tests ✓ ingress: should verify deny all (27573ms) ✓ ingress: should allow pods from the same NS (25867ms) ✓ ingress: should allow pods from different NS (21141ms) ✓ ingress: should validate peers by IP block (20154ms) egress policies tests ✓ egress: should verify deny all (11043ms) ✓ egress: should allow traffic to pods in the same namespace (20528ms) ✓ egress: should allow traffic to different NS (20926ms) delete project delete project delete project Logging out ✓ egress: should allow traffic to peers by CIDR (22488ms) 10 passing (5m) [mochawesome] Report JSON saved to /Users/memodi/workspaces/repos/openshift-tests-private/frontend/gui_test_screenshots/cypress_report_016.json (Results) ┌────────────────────────────────────────────────────────────────────────────────────────────────┐ │ Tests: 10 │ │ Passing: 10 │ │ Failing: 0 │ │ Pending: 0 │ │ Skipped: 0 │ │ Screenshots: 0 │ │ Video: true │ │ Duration: 5 minutes, 6 seconds │ │ Spec Ran: netobserv/networkpolicy_form.spec.ts │ └────────────────────────────────────────────────────────────────────────────────────────────────┘ (Video) - Started processing: Compressing to 32 CRF Compression progress: 78% - Finished processing: /Users/memodi/workspaces/repos/openshift-tests-private/fron (15 seconds) tend/gui_test_screenshots/cypress/videos/netobserv/networkp olicy_form.spec.ts.mp4 ==================================================================================================== (Run Finished) Spec Tests Passing Failing Pending Skipped ┌────────────────────────────────────────────────────────────────────────────────────────────────┐ │ ✔ netobserv/networkpolicy_form.spec.t 05:06 10 10 - - - │ │ s │ └────────────────────────────────────────────────────────────────────────────────────────────────┘ ✔ All specs passed! 05:06 10 10 - - -