parent
14747f45ca
commit
4540ca365c
2 changed files with 11 additions and 3 deletions
|
@ -94,9 +94,9 @@ To run tests on Mac with `minikube` and the `docker` driver you should run `mini
|
|||
-Dtest.operator.kubernetes.ip=localhost
|
||||
```
|
||||
|
||||
On Linux or on Mac using `minikube` on a VM, instead you should pass this additional property:
|
||||
On Linux or on Mac using `minikube` on a VM, instead you should enable ingress:
|
||||
```bash
|
||||
-Dtest.operator.kubernetes.ip=$(minikube ip)
|
||||
minikube addons enable ingress
|
||||
```
|
||||
|
||||
To avoid skipping tests that are depending on custom Keycloak images, you need to build those first:
|
||||
|
|
|
@ -46,6 +46,8 @@ import java.io.File;
|
|||
import java.io.FileInputStream;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.FileWriter;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
import java.time.Duration;
|
||||
import java.util.UUID;
|
||||
|
||||
|
@ -84,12 +86,18 @@ public abstract class BaseOperatorTest {
|
|||
reconcilers = CDI.current().select(new TypeLiteral<>() {});
|
||||
operatorDeployment = ConfigProvider.getConfig().getOptionalValue(OPERATOR_DEPLOYMENT_PROP, OperatorDeployment.class).orElse(OperatorDeployment.local);
|
||||
deploymentTarget = ConfigProvider.getConfig().getOptionalValue(QUARKUS_KUBERNETES_DEPLOYMENT_TARGET, String.class).orElse("kubernetes");
|
||||
kubernetesIp = ConfigProvider.getConfig().getOptionalValue(OPERATOR_KUBERNETES_IP, String.class).orElse("localhost");
|
||||
customImage = ConfigProvider.getConfig().getOptionalValue(OPERATOR_CUSTOM_IMAGE, String.class).orElse(null);
|
||||
|
||||
setDefaultAwaitilityTimings();
|
||||
calculateNamespace();
|
||||
createK8sClient();
|
||||
kubernetesIp = ConfigProvider.getConfig().getOptionalValue(OPERATOR_KUBERNETES_IP, String.class).orElseGet(() -> {
|
||||
try {
|
||||
return new URL(k8sclient.getConfiguration().getMasterUrl()).getHost();
|
||||
} catch (MalformedURLException e) {
|
||||
return "localhost";
|
||||
}
|
||||
});
|
||||
createCRDs();
|
||||
createNamespace();
|
||||
isOpenShift = isOpenShift(k8sclient);
|
||||
|
|
Loading…
Reference in a new issue