Add more tests (#1949)

* add more test code

* add more test code
This commit is contained in:
zryfish
2020-03-15 10:22:39 +08:00
committed by GitHub
parent f8e7d06b07
commit abf0d66b22
13 changed files with 444 additions and 55 deletions

View File

@@ -29,15 +29,18 @@ import (
"time"
)
// default re-sync period for all informer factories
const defaultResync = 600 * time.Second
// InformerFactory is a group all shared informer factories which kubesphere needed
// callers should check if the return value is nil
type InformerFactory interface {
KubernetesSharedInformerFactory() k8sinformers.SharedInformerFactory
KubeSphereSharedInformerFactory() ksinformers.SharedInformerFactory
IstioSharedInformerFactory() istioinformers.SharedInformerFactory
ApplicationSharedInformerFactory() applicationinformers.SharedInformerFactory
// Start all the informer factories if not nil
// Start shared informer factory one by one if they are not nil
Start(stopCh <-chan struct{})
}