aboutsummaryrefslogtreecommitdiffstats
path: root/src/ncm/api/clusterhandler_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/ncm/api/clusterhandler_test.go')
-rw-r--r--src/ncm/api/clusterhandler_test.go18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/ncm/api/clusterhandler_test.go b/src/ncm/api/clusterhandler_test.go
index a26c41bd..b32df527 100644
--- a/src/ncm/api/clusterhandler_test.go
+++ b/src/ncm/api/clusterhandler_test.go
@@ -28,6 +28,7 @@ import (
"testing"
moduleLib "github.com/onap/multicloud-k8s/src/ncm/pkg/module"
+ "github.com/onap/multicloud-k8s/src/orchestrator/pkg/appcontext"
pkgerrors "github.com/pkg/errors"
)
@@ -41,6 +42,7 @@ type mockClusterManager struct {
ClusterProviderItems []moduleLib.ClusterProvider
ClusterItems []moduleLib.Cluster
ClusterContentItems []moduleLib.ClusterContent
+ ClusterContextItems []appcontext.AppContext
ClusterLabelItems []moduleLib.ClusterLabel
ClusterKvPairsItems []moduleLib.ClusterKvPairs
ClusterList []string
@@ -99,6 +101,14 @@ func (m *mockClusterManager) GetClusterContent(provider, name string) (moduleLib
return m.ClusterContentItems[0], nil
}
+func (m *mockClusterManager) GetClusterContext(provider, name string) (appcontext.AppContext, error) {
+ if m.Err != nil {
+ return appcontext.AppContext{}, m.Err
+ }
+
+ return m.ClusterContextItems[0], nil
+}
+
func (m *mockClusterManager) GetClusters(provider string) ([]moduleLib.Cluster, error) {
if m.Err != nil {
return []moduleLib.Cluster{}, m.Err
@@ -119,6 +129,14 @@ func (m *mockClusterManager) DeleteCluster(provider, name string) error {
return m.Err
}
+func (m *mockClusterManager) ApplyNetworkIntents(provider, name string) error {
+ return m.Err
+}
+
+func (m *mockClusterManager) TerminateNetworkIntents(provider, name string) error {
+ return m.Err
+}
+
func (m *mockClusterManager) CreateClusterLabel(provider, cluster string, inp moduleLib.ClusterLabel) (moduleLib.ClusterLabel, error) {
if m.Err != nil {
return moduleLib.ClusterLabel{}, m.Err