Skip to content

Conversation

@mkolesnik
Copy link
Collaborator

What type of PR is this?

  • Enhancement / New Feature
  • Bug Fix
  • Refactor
  • Optimization
  • Test
  • Documentation Update

What this PR does / why we need it:

This PR incorporates several changes that refactor the E2E tests and consolidate various checks that are very verbose and very repetitive.
By consolidating the checks into common functions, the test code becomes much more readable and thus easier to write and maintain.
Another benefit of using common functions is lower chance for errors due to copy/pasting the same code and tweaking it slightly.

Which issue(s) this PR fixes:

Fixes #

Related Issue/PR #

Additional information:

@mkolesnik mkolesnik requested a review from a team as a code owner November 27, 2025 08:04
@codecov
Copy link

codecov bot commented Nov 27, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 81.03%. Comparing base (ec1f62e) to head (2cb5e6d).
⚠️ Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1397      +/-   ##
==========================================
+ Coverage   80.55%   81.03%   +0.47%     
==========================================
  Files          44       44              
  Lines        2299     2299              
==========================================
+ Hits         1852     1863      +11     
+ Misses        328      321       -7     
+ Partials      119      115       -4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

This code is very repetitive and verbose, extracting it to a common
function allows the tests to be much more concise and readable, without
affecting functionality.
The main benefit of this is making the tests easier to read and
maintain, and avoid repeating code (and making mistakes).

Signed-off-by: Mike Kolesnik <[email protected]>
Most of the tests that await for the DeploymentAvailable condition do it
on the control plane namespace for a Deployment.
Extracting this specific case makes the tests even easier to read and
understand.

Signed-off-by: Mike Kolesnik <[email protected]>
Reuse CheckPodsReady and add a specific function CheckSamplePodsReady
since most of the calls are on the sample namespace.
Both checks are now in the `checks.go` file for logical consistency.

Signed-off-by: Mike Kolesnik <[email protected]>
This is repetitive and verbose, extracting this makes the tests easier to
read and maintain.

Signed-off-by: Mike Kolesnik <[email protected]>
@mkolesnik mkolesnik force-pushed the e2e-code-consolidate branch from 31e1ed4 to 2cb5e6d Compare November 27, 2025 10:05
Copy link
Contributor

@fjglira fjglira left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks a lot for this enhancement of the E2E framework

@istio-testing istio-testing merged commit 69cd12f into istio-ecosystem:main Dec 2, 2025
17 checks passed
openshift-service-mesh-bot pushed a commit to openshift-service-mesh-bot/sail-operator that referenced this pull request Dec 2, 2025
* upstream/main:
  Fix update Istio version in docs for main readme (istio-ecosystem#1419)
  E2E code consolidations (istio-ecosystem#1397)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants