func (tc *testContext) ensurePrivateKeyDeleted() error {
	for _, ns := range []string{tc.namespace, tc.workloadNamespace} {
		err := tc.client.K8s.CoreV1().Secrets(ns).Delete(context.TODO(), secrets.PrivateKeySecret, meta.DeleteOptions{})
		if err != nil && !apierrors.IsNotFound(err) {
			return errors.Wrapf(err, "could not delete private key secret in namespace %s", ns)
		}
	}
	return nil
}
// ensurePrivateKeyDeleted ensures that the privateKeySecret is deleted in both the operator and test namespaces
ensurePrivateKeyDeleted ensures that the privateKeySecret is deleted in both the operator and test namespaces
// ensurePrivateKeyDeleted ensures that the privateKeySecret is deleted in both the operator and test namespaces
func (tc *testContext) ensurePrivateKeyDeleted() error {
	for _, ns := range []string{tc.namespace, tc.workloadNamespace} {
		err := tc.client.K8s.CoreV1().Secrets(ns).Delete(context.TODO(), secrets.PrivateKeySecret, meta.DeleteOptions{})
		if err != nil && !apierrors.IsNotFound(err) {
			return errors.Wrapf(err, "could not delete private key secret in namespace %s", ns)
		}
	}
	return nil
}
func ( tc * testContext ) ensurePrivateKeyDeleted ( ) error { for _ , ns := range [ ] string { tc . namespace , tc . workloadNamespace } { err := tc . client . K8s . CoreV1 ( ) . Secrets ( ns ) . Delete ( context . TODO ( ) , secrets . PrivateKeySecret , meta . DeleteOptions { } ) if err != nil && ! apierrors . IsNotFound ( err ) { return errors . Wrapf ( err , " " , ns ) } } return nil }
ensurePrivateKeyDeleted ensures that the privateKeySecret is deleted in both the operator and test namespaces
ensurePrivateKeyDeleted ensures that the privateKeySecret is deleted in both the operator and test namespaces