Merge "RIC-208 - KA Decision: ask K8S to restart E2T instance - comment code of kuber...
[ric-plt/e2mgr.git] / E2Manager / managers / e2t_shutdown_manager_test.go
index 7490c42..9e3fcc3 100644 (file)
@@ -35,8 +35,8 @@ import (
        "github.com/stretchr/testify/assert"
        "github.com/stretchr/testify/mock"
        "io/ioutil"
-       "k8s.io/apimachinery/pkg/runtime"
-       "k8s.io/client-go/kubernetes/fake"
+       //"k8s.io/apimachinery/pkg/runtime"
+       //"k8s.io/client-go/kubernetes/fake"
        "net/http"
        "testing"
        "time"
@@ -56,11 +56,14 @@ func initE2TShutdownManagerTest(t *testing.T) (*E2TShutdownManager, *mocks.RnibR
        httpClientMock := &mocks.HttpClientMock{}
        rmClient := clients.NewRoutingManagerClient(log, config, httpClientMock)
        associationManager := NewE2TAssociationManager(log, rnibDataService, e2tInstancesManager, rmClient)
-       kubernetesManager := initKubernetesManagerTest(t)
+       //kubernetesManager := initKubernetesManagerTest(t)
 
-       shutdownManager := NewE2TShutdownManager(log, config, rnibDataService, e2tInstancesManager, associationManager, kubernetesManager)
+       /*shutdownManager := NewE2TShutdownManager(log, config, rnibDataService, e2tInstancesManager, associationManager, kubernetesManager)
 
-       return shutdownManager, readerMock, writerMock, httpClientMock, kubernetesManager
+       return shutdownManager, readerMock, writerMock, httpClientMock, kubernetesManager*/
+       shutdownManager := NewE2TShutdownManager(log, config, rnibDataService, e2tInstancesManager, associationManager, nil)
+
+       return shutdownManager, readerMock, writerMock, httpClientMock, nil
 }
 
 func TestShutdownSuccess1OutOf3Instances(t *testing.T) {
@@ -409,7 +412,7 @@ func TestShutdownFailureInRemoveE2TInstance(t *testing.T) {
        writerMock.AssertExpectations(t)
        httpClientMock.AssertExpectations(t)
 }
-
+/*
 func TestShutdownSuccess2Instance2Rans(t *testing.T) {
        shutdownManager, readerMock, writerMock, httpClientMock,kubernetesManager  := initE2TShutdownManagerTest(t)
 
@@ -504,4 +507,4 @@ func TestShutdownSuccess2Instance2RansNoPod(t *testing.T) {
                writerMock.AssertExpectations(t)
                httpClientMock.AssertExpectations(t)
        })
-}
\ No newline at end of file
+}*/
\ No newline at end of file