From b5c85c5cb08fc5f428e4ceb9629c816ca3c1c0f8 Mon Sep 17 00:00:00 2001 From: Anatolii Bazko Date: Thu, 23 May 2024 15:29:46 +0200 Subject: [PATCH] fixup Signed-off-by: Anatolii Bazko --- .../pluginregistry/pluginregistry_test.go | 22 ++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/pkg/deploy/pluginregistry/pluginregistry_test.go b/pkg/deploy/pluginregistry/pluginregistry_test.go index 051f48fd8..ffe1fe43c 100644 --- a/pkg/deploy/pluginregistry/pluginregistry_test.go +++ b/pkg/deploy/pluginregistry/pluginregistry_test.go @@ -14,8 +14,11 @@ package pluginregistry import ( "github.com/devfile/devworkspace-operator/pkg/infrastructure" + chev2 "github.com/eclipse-che/che-operator/api/v2" "github.com/eclipse-che/che-operator/pkg/common/test" "github.com/stretchr/testify/assert" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + "k8s.io/utils/pointer" appsv1 "k8s.io/api/apps/v1" corev1 "k8s.io/api/core/v1" @@ -28,7 +31,24 @@ import ( func TestPluginRegistryReconcile(t *testing.T) { infrastructure.InitializeForTesting(infrastructure.OpenShiftv4) - ctx := test.GetDeployContext(nil, []runtime.Object{}) + ctx := test.GetDeployContext( + &chev2.CheCluster{ + ObjectMeta: metav1.ObjectMeta{ + Name: "eclipse-che", + Namespace: "eclipse-che", + }, + Spec: chev2.CheClusterSpec{ + Components: chev2.CheClusterComponents{ + PluginRegistry: chev2.PluginRegistry{ + OpenVSXURL: pointer.String(""), + }, + }, + }, + Status: chev2.CheClusterStatus{ + CheURL: "https://che-host", + }, + }, + []runtime.Object{}) pluginregistry := NewPluginRegistryReconciler() _, done, err := pluginregistry.Reconcile(ctx)