| 78 | ) |
| 79 | |
| 80 | func createFakeOperatorDeployment(ctx context.Context, kubeClient client.Client) error { |
| 81 | operatorDep := appsv1.Deployment{ |
| 82 | TypeMeta: metav1.TypeMeta{}, |
| 83 | ObjectMeta: metav1.ObjectMeta{ |
| 84 | Name: operatorDeploymentName, |
| 85 | Namespace: operatorNamespaceName, |
| 86 | Labels: map[string]string{ |
| 87 | "app.kubernetes.io/name": "cloudnative-pg", |
| 88 | }, |
| 89 | }, |
| 90 | Spec: appsv1.DeploymentSpec{}, |
| 91 | } |
| 92 | |
| 93 | return kubeClient.Create(ctx, &operatorDep) |
| 94 | } |
| 95 | |
| 96 | func generateFakeClient() client.Client { |
| 97 | scheme := controllerScheme.BuildWithAllKnownScheme() |