Signed-off-by: Anatolii Bazko <abazko@redhat.com>
pull/1843/head
Anatolii Bazko 2024-05-23 15:29:46 +02:00
parent d86b541ac3
commit b5c85c5cb0
1 changed files with 21 additions and 1 deletions

View File

@ -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)