EventuallyExecQueryInInstancePod wraps QueryInInstancePod with an Eventually clause
( ctx context.Context, crudClient client.Client, kubeInterface kubernetes.Interface, restConfig *rest.Config, podLocator PodLocator, dbname DatabaseName, query string, retryTimeout int, pollingTime int, )
| 135 | |
| 136 | // EventuallyExecQueryInInstancePod wraps QueryInInstancePod with an Eventually clause |
| 137 | func EventuallyExecQueryInInstancePod( |
| 138 | ctx context.Context, |
| 139 | crudClient client.Client, |
| 140 | kubeInterface kubernetes.Interface, |
| 141 | restConfig *rest.Config, |
| 142 | podLocator PodLocator, |
| 143 | dbname DatabaseName, |
| 144 | query string, |
| 145 | retryTimeout int, |
| 146 | pollingTime int, |
| 147 | ) (string, string, error) { |
| 148 | var stdOut, stdErr string |
| 149 | var err error |
| 150 | |
| 151 | Eventually(func() error { |
| 152 | stdOut, stdErr, err = QueryInInstancePod( |
| 153 | ctx, crudClient, kubeInterface, restConfig, |
| 154 | podLocator, dbname, query) |
| 155 | return err |
| 156 | }, retryTimeout, pollingTime).Should(Succeed()) |
| 157 | |
| 158 | return stdOut, stdErr, err |
| 159 | } |
| 160 | |
| 161 | // Command wraps the utils.ExecCommand pre-setting values constant during |
| 162 | // tests |
no test coverage detected