@@ -11,14 +11,14 @@ import (
11
11
"net/http"
12
12
"reflect"
13
13
"testing"
14
+ "time"
14
15
15
16
apiv1 "k8s.io/api/core/v1"
16
17
"k8s.io/autoscaler/cluster-autoscaler/cloudprovider"
17
18
"k8s.io/autoscaler/cluster-autoscaler/cloudprovider/oci/vendor-internal/github.com/oracle/oci-go-sdk/v65/common"
18
19
kubeletapis "k8s.io/kubelet/pkg/apis"
19
20
20
21
ocicommon "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/oci/common"
21
- npconsts "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/oci/nodepools/consts"
22
22
oke "k8s.io/autoscaler/cluster-autoscaler/cloudprovider/oci/vendor-internal/github.com/oracle/oci-go-sdk/v65/containerengine"
23
23
)
24
24
@@ -447,11 +447,10 @@ func TestNodeGroupAutoDiscovery(t *testing.T) {
447
447
nodePoolCache := newNodePoolCache (nil )
448
448
nodePoolCache .okeClient = mockOKEClient {}
449
449
450
- cloudConfig , err := ocicommon .CreateCloudConfig ("" , common .DefaultConfigProvider (), npconsts .OciNodePoolResourceIdent )
451
- if cloudConfig == nil || err != nil {
452
- //klog.Infof("Error: cloudConfig is nil. %s", err)
453
- t .Errorf ("Error: cloudConfig is nil. %s" , err )
454
- }
450
+ cloudConfig := & ocicommon.CloudConfig {}
451
+ cloudConfig .Global .RefreshInterval = 5 * time .Minute
452
+ cloudConfig .Global .CompartmentID = autoDiscoveryCompartment
453
+
455
454
manager := & ociManagerImpl {
456
455
nodePoolCache : nodePoolCache ,
457
456
nodeGroups : []nodeGroupAutoDiscovery {* nodeGroup },
0 commit comments