E2E code consolidations#1397
Merged
istio-testing merged 4 commits intoistio-ecosystem:mainfrom Dec 2, 2025
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
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 <mkolesni@redhat.com>
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 <mkolesni@redhat.com>
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 <mkolesni@redhat.com>
This is repetitive and verbose, extracting this makes the tests easier to read and maintain. Signed-off-by: Mike Kolesnik <mkolesni@redhat.com>
31e1ed4 to
2cb5e6d
Compare
fjglira
approved these changes
Dec 2, 2025
Contributor
fjglira
left a comment
There was a problem hiding this comment.
LGTM, thanks a lot for this enhancement of the E2E framework
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)
unsortedhashsets
pushed a commit
to unsortedhashsets/sail-operator
that referenced
this pull request
Feb 11, 2026
* E2E: Extract common function to await conditions 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 <mkolesni@redhat.com> * E2E: Add specific AwaitDeployment function 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 <mkolesni@redhat.com> * E2E: Add CheckSamplePodsReady function 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 <mkolesni@redhat.com> * E2E: Extract waiting for CNI DaemonSet to be ready This is repetitive and verbose, extracting this makes the tests easier to read and maintain. Signed-off-by: Mike Kolesnik <mkolesni@redhat.com> --------- Signed-off-by: Mike Kolesnik <mkolesni@redhat.com>
openshift-merge-bot bot
pushed a commit
to openshift-service-mesh/sail-operator
that referenced
this pull request
Feb 11, 2026
* E2E code consolidations (istio-ecosystem#1397) * E2E: Extract common function to await conditions 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 <mkolesni@redhat.com> * E2E: Add specific AwaitDeployment function 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 <mkolesni@redhat.com> * E2E: Add CheckSamplePodsReady function 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 <mkolesni@redhat.com> * E2E: Extract waiting for CNI DaemonSet to be ready This is repetitive and verbose, extracting this makes the tests easier to read and maintain. Signed-off-by: Mike Kolesnik <mkolesni@redhat.com> --------- Signed-off-by: Mike Kolesnik <mkolesni@redhat.com> * Add Ambient multi cluster E2E tests for Multi Primary deployments (istio-ecosystem#1353) * Expose common namespaces in E2E tests To be able to use directly without redefining or passing them all over. The namespaces are reused in the test suite files (instead of redefined) in order to minimize the amount of changes, but we can further refactor this in the future. Signed-off-by: Mike Kolesnik <mkolesni@redhat.com> * Extract multicluster resource creation This males tests easier to maintain while avoiding code duplication Signed-off-by: Mike Kolesnik <mkolesni@redhat.com> * Add Ambient tests to E2E Multi Primary Istio 1.27+ supports running Multi-Primary deployments in Abmient mode, so tests were adapted to run both on Sidecar and Ambient mode. Both modes run the same tests, sequentialy & independently of each other. Signed-off-by: Mike Kolesnik <mkolesni@redhat.com> --------- Signed-off-by: Mike Kolesnik <mkolesni@redhat.com> * E2E: Fixes to stabilize the multicluster tests further (istio-ecosystem#1472) * E2E: Add a validation for E/W GW to get LB IP This might take a while, expecially on a public cloud. Make sure the tests wait for the IP to be assigned before proceeding, otherwise they'll get stuck later waiting for the communication to proceed (and sometimes fail). Signed-off-by: Mike Kolesnik <mkolesni@redhat.com> * E2E: Add check that multicluster gateway rechable To rule out infrastructure problems, a sanity check is added to try and reach the gateway on the other side. If this check fails, this could indicate an infrastructure problem. Signed-off-by: Mike Kolesnik <mkolesni@redhat.com> * E2E: Improve connectivity checking in multicluster Having curl fetch the URL several times saves time waiting on responses since it's much cheaper than each `exec` call. This makes successful tests finish much faster instead of waiting for the response to randomly land on the expected version. Signed-off-by: Mike Kolesnik <mkolesni@redhat.com> --------- Signed-off-by: Mike Kolesnik <mkolesni@redhat.com> --------- Signed-off-by: Mike Kolesnik <mkolesni@redhat.com> Co-authored-by: Mike Kolesnik <mkolesni@redhat.com>
dgn
pushed a commit
to dgn/sail-operator
that referenced
this pull request
Mar 17, 2026
* E2E: Extract common function to await conditions 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 <mkolesni@redhat.com> * E2E: Add specific AwaitDeployment function 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 <mkolesni@redhat.com> * E2E: Add CheckSamplePodsReady function 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 <mkolesni@redhat.com> * E2E: Extract waiting for CNI DaemonSet to be ready This is repetitive and verbose, extracting this makes the tests easier to read and maintain. Signed-off-by: Mike Kolesnik <mkolesni@redhat.com> --------- Signed-off-by: Mike Kolesnik <mkolesni@redhat.com> Signed-off-by: Daniel Grimm <dgrimm@redhat.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What type of PR is this?
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: