From ee31415bea73ae687682161a8f04e5f7aa78282b Mon Sep 17 00:00:00 2001 From: Sivaanand Murugesan Date: Mon, 25 Sep 2023 16:06:19 +0530 Subject: [PATCH] PLT-698:Unit test support for edge native --- client/client.go | 3 +++ client/cluster_edge_native.go | 3 +++ 2 files changed, 6 insertions(+) diff --git a/client/client.go b/client/client.go index 3dc95f7e..f9d82329 100644 --- a/client/client.go +++ b/client/client.go @@ -113,6 +113,9 @@ type V1Client struct { CreateOciEcrRegistryFn func(registry *models.V1EcrRegistry) (string, error) UpdateEcrRegistryFn func(uid string, registry *models.V1EcrRegistry) error GetOciRegistryFn func(uid string) (*models.V1EcrRegistry, error) + + // Edge Native + GetCloudConfigEdgeNativeFn func(uid string, clusterContext string) (*models.V1EdgeNativeCloudConfig, error) } func New(hubbleHost, email, password, projectUID, apikey string, transportDebug bool, retryAttempts int) *V1Client { diff --git a/client/cluster_edge_native.go b/client/cluster_edge_native.go index 51fca81e..288606b6 100644 --- a/client/cluster_edge_native.go +++ b/client/cluster_edge_native.go @@ -89,6 +89,9 @@ func (h *V1Client) DeleteMachinePoolEdgeNative(cloudConfigId, machinePoolName, C } func (h *V1Client) GetCloudConfigEdgeNative(configUID, ClusterContext string) (*models.V1EdgeNativeCloudConfig, error) { + if h.GetCloudConfigEdgeNativeFn != nil { + return h.GetCloudConfigEdgeNativeFn(configUID, ClusterContext) + } client, err := h.GetClusterClient() if err != nil { return nil, err