Ensure e2e tests use the correct versions yaml file#667
Ensure e2e tests use the correct versions yaml file#667istio-testing merged 1 commit intoistio-ecosystem:mainfrom
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #667 +/- ##
==========================================
- Coverage 74.57% 74.16% -0.42%
==========================================
Files 42 43 +1
Lines 2584 2597 +13
==========================================
- Hits 1927 1926 -1
- Misses 565 577 +12
- Partials 92 94 +2 ☔ View full report in Codecov by Sentry. |
pkg/istioversion/version.go
Outdated
| return list, defaultVersion, oldVersion, newVersion, versionMap, aliasList | ||
| } | ||
|
|
||
| func getEnvVar(key string, defaultValue string) string { |
There was a problem hiding this comment.
There is already an env.Get defined in the e2e util package:
sail-operator/tests/e2e/util/env/env.go
Lines 26 to 27 in 72c1264
Maybe worth moving it to a common place and used it both in the version.go and in the e2e test. wdyt?
There was a problem hiding this comment.
Yes, you're absolutely right.
I've moved it to pkg/env, but I had to remove the ginkgo logging. I hated that thing anyway, because it got printed even when the tests weren't running in verbose mode. If we need those lines, we should move print them somewhere else.
We use `-ldflags` to set the `istioversion.versionsFilename` variable, but this only works when building the binary. It doesn't work when running ginkgo-based e2e tests. When the `versionsFilename` is not set via ldflags, it will now use the environment variable `VERSIONS_YAML_FILE`. If this env var isn't set, we default to `versions.yaml`. Signed-off-by: Marko Lukša <mluksa@redhat.com>
0163196 to
19d9ddf
Compare
|
In response to a cherrypick label: #667 failed to apply on top of branch "release-1.0": |
|
In response to a cherrypick label: new issue created for failed cherrypick: #668 |
) We use `-ldflags` to set the `istioversion.versionsFilename` variable, but this only works when building the binary. It doesn't work when running ginkgo-based e2e tests. When the `versionsFilename` is not set via ldflags, it will now use the environment variable `VERSIONS_YAML_FILE`. If this env var isn't set, we default to `versions.yaml`. Signed-off-by: Marko Lukša <mluksa@redhat.com> (cherry picked from commit 148eb64) Signed-off-by: Marko Lukša <mluksa@redhat.com>
We use `-ldflags` to set the `istioversion.versionsFilename` variable, but this only works when building the binary. It doesn't work when running ginkgo-based e2e tests. When the `versionsFilename` is not set via ldflags, it will now use the environment variable `VERSIONS_YAML_FILE`. If this env var isn't set, we default to `versions.yaml`. (cherry picked from commit 148eb64) Signed-off-by: Marko Lukša <mluksa@redhat.com>
) (istio-ecosystem#669) We use `-ldflags` to set the `istioversion.versionsFilename` variable, but this only works when building the binary. It doesn't work when running ginkgo-based e2e tests. When the `versionsFilename` is not set via ldflags, it will now use the environment variable `VERSIONS_YAML_FILE`. If this env var isn't set, we default to `versions.yaml`. (cherry picked from commit 148eb64) Signed-off-by: Marko Lukša <mluksa@redhat.com>
We use `-ldflags` to set the `istioversion.versionsFilename` variable, but this only works when building the binary. It doesn't work when running ginkgo-based e2e tests. When the `versionsFilename` is not set via ldflags, it will now use the environment variable `VERSIONS_YAML_FILE`. If this env var isn't set, we default to `versions.yaml`. (cherry picked from commit 148eb64) Signed-off-by: Marko Lukša <mluksa@redhat.com>
) We use `-ldflags` to set the `istioversion.versionsFilename` variable, but this only works when building the binary. It doesn't work when running ginkgo-based e2e tests. When the `versionsFilename` is not set via ldflags, it will now use the environment variable `VERSIONS_YAML_FILE`. If this env var isn't set, we default to `versions.yaml`. Signed-off-by: Marko Lukša <mluksa@redhat.com>
* upstream/release-1.0: Make environment variable consistent (openshift-service-mesh#664) Add multi control plane e2e tests (openshift-service-mesh#610) (openshift-service-mesh#670) Ensure e2e tests use the correct versions yaml file (openshift-service-mesh#667) (openshift-service-mesh#669) Add version alias support (openshift-service-mesh#566) (openshift-service-mesh#662) Add missing link for: Example using the RevisionBased strategy and an IstioRevisionTag # Conflicts: # bundle/manifests/sailoperator.clusterserviceversion.yaml
) We use `-ldflags` to set the `istioversion.versionsFilename` variable, but this only works when building the binary. It doesn't work when running ginkgo-based e2e tests. When the `versionsFilename` is not set via ldflags, it will now use the environment variable `VERSIONS_YAML_FILE`. If this env var isn't set, we default to `versions.yaml`. Signed-off-by: Marko Lukša <mluksa@redhat.com> Signed-off-by: Francisco H <frherrer@redhat.com>
Signed-off-by: Francisco H <frherrer@redhat.com> Clean up multicluister test Signed-off-by: Francisco H <frherrer@redhat.com> Adding primary remote multicluster e2e test Signed-off-by: Francisco H <frherrer@redhat.com> Ensure e2e tests use the correct versions yaml file (istio-ecosystem#667) We use `-ldflags` to set the `istioversion.versionsFilename` variable, but this only works when building the binary. It doesn't work when running ginkgo-based e2e tests. When the `versionsFilename` is not set via ldflags, it will now use the environment variable `VERSIONS_YAML_FILE`. If this env var isn't set, we default to `versions.yaml`. Signed-off-by: Marko Lukša <mluksa@redhat.com> Signed-off-by: Francisco H <frherrer@redhat.com> e2e multicluster test improve Signed-off-by: Francisco H <frherrer@redhat.com> Fix lint errors Signed-off-by: Francisco H <frherrer@redhat.com> Delete references to bookinfo on multicluster test Signed-off-by: Francisco H <frherrer@redhat.com> Fix change package on external multicluster test Signed-off-by: Francisco H <frherrer@redhat.com>
* upstream-eco/main: Ensure e2e tests use the correct versions yaml file (istio-ecosystem#667) Make environment variable consistent (istio-ecosystem#663) Add contributor meeting information to the contributor.md file (istio-ecosystem#623) Add version alias support (istio-ecosystem#566)
Signed-off-by: Francisco H <frherrer@redhat.com> Clean up multicluister test Signed-off-by: Francisco H <frherrer@redhat.com> Adding primary remote multicluster e2e test Signed-off-by: Francisco H <frherrer@redhat.com> Ensure e2e tests use the correct versions yaml file (istio-ecosystem#667) We use `-ldflags` to set the `istioversion.versionsFilename` variable, but this only works when building the binary. It doesn't work when running ginkgo-based e2e tests. When the `versionsFilename` is not set via ldflags, it will now use the environment variable `VERSIONS_YAML_FILE`. If this env var isn't set, we default to `versions.yaml`. Signed-off-by: Marko Lukša <mluksa@redhat.com> Signed-off-by: Francisco H <frherrer@redhat.com> e2e multicluster test improve Signed-off-by: Francisco H <frherrer@redhat.com> Fix lint errors Signed-off-by: Francisco H <frherrer@redhat.com> Delete references to bookinfo on multicluster test Signed-off-by: Francisco H <frherrer@redhat.com> Fix change package on external multicluster test Signed-off-by: Francisco H <frherrer@redhat.com>
* e2e multicluster test improve Signed-off-by: Francisco H <frherrer@redhat.com> Clean up multicluister test Signed-off-by: Francisco H <frherrer@redhat.com> Adding primary remote multicluster e2e test Signed-off-by: Francisco H <frherrer@redhat.com> Ensure e2e tests use the correct versions yaml file (#667) We use `-ldflags` to set the `istioversion.versionsFilename` variable, but this only works when building the binary. It doesn't work when running ginkgo-based e2e tests. When the `versionsFilename` is not set via ldflags, it will now use the environment variable `VERSIONS_YAML_FILE`. If this env var isn't set, we default to `versions.yaml`. Signed-off-by: Marko Lukša <mluksa@redhat.com> Signed-off-by: Francisco H <frherrer@redhat.com> e2e multicluster test improve Signed-off-by: Francisco H <frherrer@redhat.com> Fix lint errors Signed-off-by: Francisco H <frherrer@redhat.com> Delete references to bookinfo on multicluster test Signed-off-by: Francisco H <frherrer@redhat.com> Fix change package on external multicluster test Signed-off-by: Francisco H <frherrer@redhat.com> * Apply suggestions from code review Co-authored-by: Nick Fox <6226732+nrfox@users.noreply.github.com> Signed-off-by: Francisco H <frherrer@redhat.com> * Changes from review Signed-off-by: Francisco H <frherrer@redhat.com> * More changes from review Signed-off-by: Francisco H <frherrer@redhat.com> * Add tag to common file in multicluster test Signed-off-by: Francisco H <frherrer@redhat.com> * Delete duplicated Label Signed-off-by: Francisco H <frherrer@redhat.com> --------- Signed-off-by: Francisco H <frherrer@redhat.com> Co-authored-by: Nick Fox <6226732+nrfox@users.noreply.github.com>
* e2e multicluster test improve Signed-off-by: Francisco H <frherrer@redhat.com> Clean up multicluister test Signed-off-by: Francisco H <frherrer@redhat.com> Adding primary remote multicluster e2e test Signed-off-by: Francisco H <frherrer@redhat.com> Ensure e2e tests use the correct versions yaml file (istio-ecosystem#667) We use `-ldflags` to set the `istioversion.versionsFilename` variable, but this only works when building the binary. It doesn't work when running ginkgo-based e2e tests. When the `versionsFilename` is not set via ldflags, it will now use the environment variable `VERSIONS_YAML_FILE`. If this env var isn't set, we default to `versions.yaml`. Signed-off-by: Marko Lukša <mluksa@redhat.com> Signed-off-by: Francisco H <frherrer@redhat.com> e2e multicluster test improve Signed-off-by: Francisco H <frherrer@redhat.com> Fix lint errors Signed-off-by: Francisco H <frherrer@redhat.com> Delete references to bookinfo on multicluster test Signed-off-by: Francisco H <frherrer@redhat.com> Fix change package on external multicluster test Signed-off-by: Francisco H <frherrer@redhat.com> * Apply suggestions from code review Co-authored-by: Nick Fox <6226732+nrfox@users.noreply.github.com> Signed-off-by: Francisco H <frherrer@redhat.com> * Changes from review Signed-off-by: Francisco H <frherrer@redhat.com> * More changes from review Signed-off-by: Francisco H <frherrer@redhat.com> * Add tag to common file in multicluster test Signed-off-by: Francisco H <frherrer@redhat.com> * Delete duplicated Label Signed-off-by: Francisco H <frherrer@redhat.com> --------- Signed-off-by: Francisco H <frherrer@redhat.com> Co-authored-by: Nick Fox <6226732+nrfox@users.noreply.github.com> Signed-off-by: Francisco H <frherrer@redhat.com>
* e2e multicluster test improve Signed-off-by: Francisco H <frherrer@redhat.com> Clean up multicluister test Signed-off-by: Francisco H <frherrer@redhat.com> Adding primary remote multicluster e2e test Signed-off-by: Francisco H <frherrer@redhat.com> Ensure e2e tests use the correct versions yaml file (istio-ecosystem#667) We use `-ldflags` to set the `istioversion.versionsFilename` variable, but this only works when building the binary. It doesn't work when running ginkgo-based e2e tests. When the `versionsFilename` is not set via ldflags, it will now use the environment variable `VERSIONS_YAML_FILE`. If this env var isn't set, we default to `versions.yaml`. Signed-off-by: Marko Lukša <mluksa@redhat.com> Signed-off-by: Francisco H <frherrer@redhat.com> e2e multicluster test improve Signed-off-by: Francisco H <frherrer@redhat.com> Fix lint errors Signed-off-by: Francisco H <frherrer@redhat.com> Delete references to bookinfo on multicluster test Signed-off-by: Francisco H <frherrer@redhat.com> Fix change package on external multicluster test Signed-off-by: Francisco H <frherrer@redhat.com> * Apply suggestions from code review Co-authored-by: Nick Fox <6226732+nrfox@users.noreply.github.com> Signed-off-by: Francisco H <frherrer@redhat.com> * Changes from review Signed-off-by: Francisco H <frherrer@redhat.com> * More changes from review Signed-off-by: Francisco H <frherrer@redhat.com> * Add tag to common file in multicluster test Signed-off-by: Francisco H <frherrer@redhat.com> * Delete duplicated Label Signed-off-by: Francisco H <frherrer@redhat.com> --------- Signed-off-by: Francisco H <frherrer@redhat.com> Co-authored-by: Nick Fox <6226732+nrfox@users.noreply.github.com> Signed-off-by: Francisco H <frherrer@redhat.com>
* e2e multicluster test improve Signed-off-by: Francisco H <frherrer@redhat.com> Clean up multicluister test Signed-off-by: Francisco H <frherrer@redhat.com> Adding primary remote multicluster e2e test Signed-off-by: Francisco H <frherrer@redhat.com> Ensure e2e tests use the correct versions yaml file (istio-ecosystem#667) We use `-ldflags` to set the `istioversion.versionsFilename` variable, but this only works when building the binary. It doesn't work when running ginkgo-based e2e tests. When the `versionsFilename` is not set via ldflags, it will now use the environment variable `VERSIONS_YAML_FILE`. If this env var isn't set, we default to `versions.yaml`. Signed-off-by: Marko Lukša <mluksa@redhat.com> Signed-off-by: Francisco H <frherrer@redhat.com> e2e multicluster test improve Signed-off-by: Francisco H <frherrer@redhat.com> Fix lint errors Signed-off-by: Francisco H <frherrer@redhat.com> Delete references to bookinfo on multicluster test Signed-off-by: Francisco H <frherrer@redhat.com> Fix change package on external multicluster test Signed-off-by: Francisco H <frherrer@redhat.com> * Apply suggestions from code review Co-authored-by: Nick Fox <6226732+nrfox@users.noreply.github.com> Signed-off-by: Francisco H <frherrer@redhat.com> * Changes from review Signed-off-by: Francisco H <frherrer@redhat.com> * More changes from review Signed-off-by: Francisco H <frherrer@redhat.com> * Add tag to common file in multicluster test Signed-off-by: Francisco H <frherrer@redhat.com> * Delete duplicated Label Signed-off-by: Francisco H <frherrer@redhat.com> --------- Signed-off-by: Francisco H <frherrer@redhat.com> Co-authored-by: Nick Fox <6226732+nrfox@users.noreply.github.com>
* e2e multicluster test improve Signed-off-by: Francisco H <frherrer@redhat.com> Clean up multicluister test Signed-off-by: Francisco H <frherrer@redhat.com> Adding primary remote multicluster e2e test Signed-off-by: Francisco H <frherrer@redhat.com> Ensure e2e tests use the correct versions yaml file (istio-ecosystem#667) We use `-ldflags` to set the `istioversion.versionsFilename` variable, but this only works when building the binary. It doesn't work when running ginkgo-based e2e tests. When the `versionsFilename` is not set via ldflags, it will now use the environment variable `VERSIONS_YAML_FILE`. If this env var isn't set, we default to `versions.yaml`. Signed-off-by: Marko Lukša <mluksa@redhat.com> Signed-off-by: Francisco H <frherrer@redhat.com> e2e multicluster test improve Signed-off-by: Francisco H <frherrer@redhat.com> Fix lint errors Signed-off-by: Francisco H <frherrer@redhat.com> Delete references to bookinfo on multicluster test Signed-off-by: Francisco H <frherrer@redhat.com> Fix change package on external multicluster test Signed-off-by: Francisco H <frherrer@redhat.com> * Apply suggestions from code review Co-authored-by: Nick Fox <6226732+nrfox@users.noreply.github.com> Signed-off-by: Francisco H <frherrer@redhat.com> * Changes from review Signed-off-by: Francisco H <frherrer@redhat.com> * More changes from review Signed-off-by: Francisco H <frherrer@redhat.com> * Add tag to common file in multicluster test Signed-off-by: Francisco H <frherrer@redhat.com> * Delete duplicated Label Signed-off-by: Francisco H <frherrer@redhat.com> --------- Signed-off-by: Francisco H <frherrer@redhat.com> Co-authored-by: Nick Fox <6226732+nrfox@users.noreply.github.com>
* e2e multicluster test improve Signed-off-by: Francisco H <frherrer@redhat.com> Clean up multicluister test Signed-off-by: Francisco H <frherrer@redhat.com> Adding primary remote multicluster e2e test Signed-off-by: Francisco H <frherrer@redhat.com> Ensure e2e tests use the correct versions yaml file (istio-ecosystem#667) We use `-ldflags` to set the `istioversion.versionsFilename` variable, but this only works when building the binary. It doesn't work when running ginkgo-based e2e tests. When the `versionsFilename` is not set via ldflags, it will now use the environment variable `VERSIONS_YAML_FILE`. If this env var isn't set, we default to `versions.yaml`. Signed-off-by: Marko Lukša <mluksa@redhat.com> Signed-off-by: Francisco H <frherrer@redhat.com> e2e multicluster test improve Signed-off-by: Francisco H <frherrer@redhat.com> Fix lint errors Signed-off-by: Francisco H <frherrer@redhat.com> Delete references to bookinfo on multicluster test Signed-off-by: Francisco H <frherrer@redhat.com> Fix change package on external multicluster test Signed-off-by: Francisco H <frherrer@redhat.com> * Apply suggestions from code review Co-authored-by: Nick Fox <6226732+nrfox@users.noreply.github.com> Signed-off-by: Francisco H <frherrer@redhat.com> * Changes from review Signed-off-by: Francisco H <frherrer@redhat.com> * More changes from review Signed-off-by: Francisco H <frherrer@redhat.com> * Add tag to common file in multicluster test Signed-off-by: Francisco H <frherrer@redhat.com> * Delete duplicated Label Signed-off-by: Francisco H <frherrer@redhat.com> --------- Signed-off-by: Francisco H <frherrer@redhat.com> Co-authored-by: Nick Fox <6226732+nrfox@users.noreply.github.com>
) (istio-ecosystem#669) (istio-ecosystem#254) We use `-ldflags` to set the `istioversion.versionsFilename` variable, but this only works when building the binary. It doesn't work when running ginkgo-based e2e tests. When the `versionsFilename` is not set via ldflags, it will now use the environment variable `VERSIONS_YAML_FILE`. If this env var isn't set, we default to `versions.yaml`. (cherry picked from commit 148eb64) Signed-off-by: Marko Lukša <mluksa@redhat.com>
istio-ecosystem#1561 added new file to resources directory so we can't remove everything. We want to remove just charts.
) We use `-ldflags` to set the `istioversion.versionsFilename` variable, but this only works when building the binary. It doesn't work when running ginkgo-based e2e tests. When the `versionsFilename` is not set via ldflags, it will now use the environment variable `VERSIONS_YAML_FILE`. If this env var isn't set, we default to `versions.yaml`. Signed-off-by: Marko Lukša <mluksa@redhat.com> Signed-off-by: Daniel Grimm <dgrimm@redhat.com>
* e2e multicluster test improve Signed-off-by: Francisco H <frherrer@redhat.com> Clean up multicluister test Signed-off-by: Francisco H <frherrer@redhat.com> Adding primary remote multicluster e2e test Signed-off-by: Francisco H <frherrer@redhat.com> Ensure e2e tests use the correct versions yaml file (istio-ecosystem#667) We use `-ldflags` to set the `istioversion.versionsFilename` variable, but this only works when building the binary. It doesn't work when running ginkgo-based e2e tests. When the `versionsFilename` is not set via ldflags, it will now use the environment variable `VERSIONS_YAML_FILE`. If this env var isn't set, we default to `versions.yaml`. Signed-off-by: Marko Lukša <mluksa@redhat.com> Signed-off-by: Francisco H <frherrer@redhat.com> e2e multicluster test improve Signed-off-by: Francisco H <frherrer@redhat.com> Fix lint errors Signed-off-by: Francisco H <frherrer@redhat.com> Delete references to bookinfo on multicluster test Signed-off-by: Francisco H <frherrer@redhat.com> Fix change package on external multicluster test Signed-off-by: Francisco H <frherrer@redhat.com> * Apply suggestions from code review Co-authored-by: Nick Fox <6226732+nrfox@users.noreply.github.com> Signed-off-by: Francisco H <frherrer@redhat.com> * Changes from review Signed-off-by: Francisco H <frherrer@redhat.com> * More changes from review Signed-off-by: Francisco H <frherrer@redhat.com> * Add tag to common file in multicluster test Signed-off-by: Francisco H <frherrer@redhat.com> * Delete duplicated Label Signed-off-by: Francisco H <frherrer@redhat.com> --------- Signed-off-by: Francisco H <frherrer@redhat.com> Co-authored-by: Nick Fox <6226732+nrfox@users.noreply.github.com> Signed-off-by: Daniel Grimm <dgrimm@redhat.com>
istio-ecosystem#1561 added new file to resources directory so we can't remove everything. We want to remove just charts.
istio-ecosystem#1561 added new file to resources directory so we can't remove everything. We want to remove just charts.
… (istio-ecosystem#730) istio-ecosystem#1561 added new file to resources directory so we can't remove everything. We want to remove just charts.
… (istio-ecosystem#731) istio-ecosystem#1561 added new file to resources directory so we can't remove everything. We want to remove just charts.
We use
-ldflagsto set theistioversion.versionsFilenamevariable, but this only works when building the binary. It doesn't work when running ginkgo-based e2e tests. When theversionsFilenameis not set via ldflags, it will now use the environment variableVERSIONS_YAML_FILE. If this env var isn't set, we default toversions.yaml.