summaryrefslogtreecommitdiffstats
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.go9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/ncm/api/clusterhandler_test.go b/src/ncm/api/clusterhandler_test.go
index af5bd160..a26c41bd 100644
--- a/src/ncm/api/clusterhandler_test.go
+++ b/src/ncm/api/clusterhandler_test.go
@@ -43,6 +43,7 @@ type mockClusterManager struct {
ClusterContentItems []moduleLib.ClusterContent
ClusterLabelItems []moduleLib.ClusterLabel
ClusterKvPairsItems []moduleLib.ClusterKvPairs
+ ClusterList []string
Err error
}
@@ -106,6 +107,14 @@ func (m *mockClusterManager) GetClusters(provider string) ([]moduleLib.Cluster,
return m.ClusterItems, nil
}
+func (m *mockClusterManager) GetClustersWithLabel(provider, label string) ([]string, error) {
+ if m.Err != nil {
+ return []string{}, m.Err
+ }
+
+ return m.ClusterList, nil
+}
+
func (m *mockClusterManager) DeleteCluster(provider, name string) error {
return m.Err
}