Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Framework ¶
type Framework struct { // k8s controller-runtime client is used in most of the controller operations. K8sClient client.Client // k8s client-go client set is needed when additional k8s operations are involved in tests. K8sClientset kubernetes.Interface // k8sAPIs supports kube-apiserver CRUD operations for each kind of resource. K8sAPIs k8s.K8sAPIs MeshClient *meshMocks.MockServiceMeshClient Resolver *meshMocks.MockResolver Cache *meshMocks.MockCacheMapClient Log loggerutil.OSOKLogger // contains filtered or unexported fields }
Framework supports common operations used by unit tests. It comes with a K8sClient, K8sClientset and K8sAPIs.
func NewDefaultFramework ¶
func NewFakeClientFramework ¶
NewFakeClientFramework creates a test framework with fake k8sClient and fake k8sClientSet You won't need to create a test namespace using fake clients
func NewTestEnvClientFramework ¶
NewTestEnvClientFramework creates a test framework with 8sClient and k8sClientSet using test environment in /testbin You will need to create a test namespace for your test cases
Click to show internal directories.
Click to hide internal directories.