You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by pc...@apache.org on 2023/04/26 08:51:19 UTC
[camel-k] 03/18: chore(test): add some CSVs dump info
This is an automated email from the ASF dual-hosted git repository.
pcongiusti pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-k.git
commit 1a3a7f758a86e118a73f3cbc496f59366d205a8a
Author: Pasquale Congiusti <pa...@gmail.com>
AuthorDate: Mon Mar 27 12:19:56 2023 +0200
chore(test): add some CSVs dump info
---
e2e/support/util/dump.go | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/e2e/support/util/dump.go b/e2e/support/util/dump.go
index 94efeac33..64741beb3 100644
--- a/e2e/support/util/dump.go
+++ b/e2e/support/util/dump.go
@@ -35,6 +35,7 @@ import (
ctrl "sigs.k8s.io/controller-runtime/pkg/client"
routev1 "github.com/openshift/api/route/v1"
+ olm "github.com/operator-framework/api/pkg/operators/v1alpha1"
"github.com/apache/camel-k/v2/pkg/client"
"github.com/apache/camel-k/v2/pkg/client/camel/clientset/versioned"
@@ -240,6 +241,22 @@ func Dump(ctx context.Context, c client.Client, ns string, t *testing.T) error {
}
}
+ // OLM CSV
+ csvs := olm.ClusterServiceVersionList{}
+ err = c.List(ctx, &csvs, ctrl.InNamespace(ns))
+ if err != nil {
+ return err
+ }
+ t.Logf("\nFound %d OLM CSVs:\n", len(csvs.Items))
+ for _, csv := range csvs.Items {
+ ref := csv
+ data, err := kubernetes.ToYAMLNoManagedFields(&ref)
+ if err != nil {
+ return err
+ }
+ t.Logf("---\n%s\n---\n", string(data))
+ }
+
// Some log from running pods
//