Documentation
¶
Index ¶
- Constants
- func DaprPod(ns, name, appID, config string) corev1.Pod
- type Kubernetes
- type Option
- func WithBaseOperatorAPI(t *testing.T, td spiffeid.TrustDomain, ns string, sentryPort int) Option
- func WithClusterDaprComponentList(t *testing.T, comps *compapi.ComponentList) Option
- func WithClusterDaprComponentListFromStore(t *testing.T, store *store.Store) Option
- func WithClusterDaprConfigurationList(t *testing.T, configs *configapi.ConfigurationList) Option
- func WithClusterDaprConfigurationListFromStore(t *testing.T, store *store.Store) Option
- func WithClusterDaprHTTPEndpointList(t *testing.T, endpoints *httpendapi.HTTPEndpointList) Option
- func WithClusterDaprHTTPEndpointListFromStore(t *testing.T, store *store.Store) Option
- func WithClusterDaprMCPServerList(t *testing.T, mcpservers *mcpapi.MCPServerList) Option
- func WithClusterDaprResiliencyList(t *testing.T, res *resapi.ResiliencyList) Option
- func WithClusterDaprResiliencyListFromStore(t *testing.T, store *store.Store) Option
- func WithClusterDaprSubscriptionList(t *testing.T, subs *subv1api.SubscriptionList) Option
- func WithClusterDaprSubscriptionListFromStore(t *testing.T, store *store.Store) Option
- func WithClusterDaprSubscriptionListV2(t *testing.T, subs *subv2api.SubscriptionList) Option
- func WithClusterDaprSubscriptionV2ListFromStore(t *testing.T, store *store.Store) Option
- func WithClusterDaprWorkflowAccessPolicyListFromStore(t *testing.T, store *store.Store) Option
- func WithClusterDeploymentList(t *testing.T, deploys *appsv1.DeploymentList) Option
- func WithClusterNamespaceList(t *testing.T, namespaces *corev1.NamespaceList) Option
- func WithClusterNamespaceListFromStore(t *testing.T, store *store.Store) Option
- func WithClusterPodList(t *testing.T, pods *corev1.PodList) Option
- func WithClusterPodListSelector(t *testing.T, selector string, pods *corev1.PodList) Option
- func WithClusterSecretListFromStore(t *testing.T, store *store.Store) Option
- func WithClusterServiceAccountList(t *testing.T, services *corev1.ServiceAccountList) Option
- func WithClusterServiceList(t *testing.T, services *corev1.ServiceList) Option
- func WithClusterStatefulSetList(t *testing.T, ss *appsv1.StatefulSetList) Option
- func WithConfigMapGet(t *testing.T, configmap *corev1.ConfigMap) Option
- func WithDaprConfigurationGet(t *testing.T, config *configapi.Configuration) Option
- func WithDaprPodList(t *testing.T, ns string, pods ...corev1.Pod) Option
- func WithDaprPods(t *testing.T, ns string, appConfigs map[string]string) Option
- func WithDaprResiliencyGet(t *testing.T, ns, name string, res *resapi.Resiliency) Option
- func WithNamespacedPodList(t *testing.T, ns string, pods *corev1.PodList) Option
- func WithNamespacedPodListFromStore(t *testing.T, ns string, store *store.Store) Option
- func WithNamespacedPodListSelector(t *testing.T, ns, selector string, pods *corev1.PodList) Option
- func WithPath(path string, handler http.HandlerFunc) Option
- func WithPodGet(t *testing.T, pod *corev1.Pod) Option
- func WithSecretGet(t *testing.T, secret *corev1.Secret) Option
- func WithSecretList(t *testing.T, secrets *corev1.SecretList) Option
- func WithStatefulSetGet(t *testing.T, statefulset *appsv1.StatefulSet) Option
Constants ¶
View Source
const (
EnvVarCRDDirectory = "DAPR_INTEGRATION_CRD_DIRECTORY"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Kubernetes ¶
type Kubernetes struct {
// contains filtered or unexported fields
}
Kubernetes is a mock Kubernetes API server process.
func (*Kubernetes) Cleanup ¶
func (k *Kubernetes) Cleanup(t *testing.T)
func (*Kubernetes) Informer ¶ added in v1.13.0
func (k *Kubernetes) Informer() *informer.Informer
func (*Kubernetes) KubeconfigPath ¶ added in v1.13.0
func (k *Kubernetes) KubeconfigPath(t *testing.T) string
func (*Kubernetes) Port ¶
func (k *Kubernetes) Port() int
type Option ¶
type Option func(*options)
Option is a function that configures the mock Kubernetes process.
func WithBaseOperatorAPI ¶ added in v1.13.0
func WithClusterDaprComponentList ¶ added in v1.13.0
func WithClusterDaprComponentList(t *testing.T, comps *compapi.ComponentList) Option
func WithClusterDaprComponentListFromStore ¶ added in v1.13.0
func WithClusterDaprConfigurationList ¶ added in v1.13.0
func WithClusterDaprConfigurationList(t *testing.T, configs *configapi.ConfigurationList) Option
func WithClusterDaprConfigurationListFromStore ¶ added in v1.18.0
func WithClusterDaprHTTPEndpointList ¶ added in v1.13.0
func WithClusterDaprHTTPEndpointList(t *testing.T, endpoints *httpendapi.HTTPEndpointList) Option
func WithClusterDaprHTTPEndpointListFromStore ¶ added in v1.18.0
func WithClusterDaprMCPServerList ¶ added in v1.18.0
func WithClusterDaprMCPServerList(t *testing.T, mcpservers *mcpapi.MCPServerList) Option
func WithClusterDaprResiliencyList ¶ added in v1.13.0
func WithClusterDaprResiliencyList(t *testing.T, res *resapi.ResiliencyList) Option
func WithClusterDaprResiliencyListFromStore ¶ added in v1.18.0
func WithClusterDaprSubscriptionList ¶ added in v1.13.0
func WithClusterDaprSubscriptionList(t *testing.T, subs *subv1api.SubscriptionList) Option
func WithClusterDaprSubscriptionListFromStore ¶ added in v1.14.0
func WithClusterDaprSubscriptionListV2 ¶ added in v1.14.0
func WithClusterDaprSubscriptionListV2(t *testing.T, subs *subv2api.SubscriptionList) Option
func WithClusterDaprSubscriptionV2ListFromStore ¶ added in v1.14.0
func WithClusterDaprWorkflowAccessPolicyListFromStore ¶ added in v1.18.0
func WithClusterDeploymentList ¶ added in v1.13.0
func WithClusterDeploymentList(t *testing.T, deploys *appsv1.DeploymentList) Option
func WithClusterNamespaceList ¶ added in v1.15.0
func WithClusterNamespaceList(t *testing.T, namespaces *corev1.NamespaceList) Option
func WithClusterNamespaceListFromStore ¶ added in v1.15.0
func WithClusterPodList ¶ added in v1.13.0
func WithClusterPodListSelector ¶ added in v1.19.0
func WithClusterSecretListFromStore ¶ added in v1.19.0
func WithClusterServiceAccountList ¶ added in v1.14.0
func WithClusterServiceAccountList(t *testing.T, services *corev1.ServiceAccountList) Option
func WithClusterServiceList ¶ added in v1.13.0
func WithClusterServiceList(t *testing.T, services *corev1.ServiceList) Option
func WithClusterStatefulSetList ¶ added in v1.13.0
func WithClusterStatefulSetList(t *testing.T, ss *appsv1.StatefulSetList) Option
func WithDaprConfigurationGet ¶
func WithDaprConfigurationGet(t *testing.T, config *configapi.Configuration) Option
func WithDaprPodList ¶ added in v1.17.18
WithDaprPodList serves the pods on both the cluster and namespaced pod list paths, so they are seen by the operator's pod cache and its direct API reads. Must be passed after WithBaseOperatorAPI, which serves empty pod lists.
func WithDaprPods ¶ added in v1.17.18
WithDaprPods serves one DaprPod per app ID, named after the app ID and assigned the mapped configuration, so the operator authorizes each app's GetConfiguration.
func WithDaprResiliencyGet ¶ added in v1.13.0
func WithNamespacedPodList ¶ added in v1.17.18
func WithNamespacedPodListFromStore ¶ added in v1.19.0
func WithNamespacedPodListSelector ¶ added in v1.17.18
WithNamespacedPodListSelector serves pods on the namespaced pod list path and asserts every request uses the given label selector.
func WithSecretList ¶ added in v1.13.6
func WithSecretList(t *testing.T, secrets *corev1.SecretList) Option
func WithStatefulSetGet ¶ added in v1.14.0
func WithStatefulSetGet(t *testing.T, statefulset *appsv1.StatefulSet) Option
Click to show internal directories.
Click to hide internal directories.