Refactor: use Kubernetes.Interface instead of *Clientset

So we can call with a mock for testing
This commit is contained in:
Bryan Boreham committed 2018-09-12 12:35:34 +00:00
1 parent 7dcd4bdf47
commit c3ce052cc5
4 files changed
+6 -6

No files matched your search

+2 -2
View File
@@ -26,11 +26,11 @@ type configMapAnnotations struct {
cm *v1.ConfigMap
}
func newConfigMapAnnotations(ns string, configMapName string, clientset *kubernetes.Clientset) *configMapAnnotations {
func newConfigMapAnnotations(ns string, configMapName string, c kubernetes.Interface) *configMapAnnotations {
return &configMapAnnotations{
Namespace: ns,
ConfigMapName: configMapName,
Client: clientset.CoreV1(),
Client: c.CoreV1(),
}
}