From 3e27b6851197e20d43648e5b3bd0341e220b1d39 Mon Sep 17 00:00:00 2001 From: Gloria Ciavarrini Date: Tue, 6 Jun 2023 14:42:47 +0200 Subject: [PATCH 1/3] Update how to run integration tests command To reflect changes in PR https://github.com/parodos-dev/parodos/pull/376 Signed-off-by: Gloria Ciavarrini --- documentation/latest/dev/guide.md | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/documentation/latest/dev/guide.md b/documentation/latest/dev/guide.md index dde2a97..2c6c505 100644 --- a/documentation/latest/dev/guide.md +++ b/documentation/latest/dev/guide.md @@ -97,24 +97,35 @@ kube-system kube-scheduler-kind-control-plane 1/1 Runnin local-path-storage local-path-provisioner-75f5b54ffd-9kzhm 1/1 Running 0 3h5m ``` -Finally, retrieve and export the cluster IP address: +Retrieve and export the cluster IP address: ```bash export SERVER_IP=$(kubectl get nodes kind-control-plane -o json | jq -r '[.status.addresses[] | select(.type=="InternalIP")] | .[0].address') ``` +Finally, use the value of `$SERVER_IP` to configure services hosts in your +`/etc/hosts` file: + +```bash +echo "$SERVER_IP workflow-service.parodos-dev" | sudo tee -a /etc/hosts +echo "$SERVER_IP notification-service.parodos-dev" | sudo tee -a /etc/hosts +``` + +The hostnames `workflow-service.parodos-dev` and +`notification-service.parodos-dev` are defined in [ingress.yaml](https://github.com/parodos-dev/parodos/blob/main/hack/manifests/testing/ingress.yaml). + You can execute the integration tests by running the following command: ```bash -WORKFLOW_SERVICE_PATH=/workflow-service \ -NOTIFICATION_SERVICE_PATH=/notification-service \ +WORKFLOW_SERVICE_HOST=workflow-service.parodos-dev \ +NOTIFICATION_SERVICE_HOST=notification-service.parodos-dev \ NOTIFICATION_SERVER_PORT=8081 \ SERVER_PORT=80 \ mvn verify -pl integration-tests -P integration-test -Dspring.profiles.active=dev ``` -Please note that `WORKFLOW_SERVICE_PATH` and `NOTIFICATION_SERVICE_PATH` are -the `Ingress` paths defined in [ingress.yaml](https://github.com/parodos-dev/parodos/blob/main/hack/manifests/testing/ingress.yaml). +Please note that `WORKFLOW_SERVICE_HOST` and `NOTIFICATION_SERVICE_HOST` are +the `Ingress` hosts defined in your `/tct/hosts` and in [ingress.yaml](https://github.com/parodos-dev/parodos/blob/main/hack/manifests/testing/ingress.yaml). They ensure that the integration tests communicate with the correct services. By combining the `integration-test` Maven profile with the `dev` Spring From d89115b0bdd707083acd46c4c9c8e845dbfcd2da Mon Sep 17 00:00:00 2001 From: Gloria Ciavarrini Date: Tue, 6 Jun 2023 17:29:25 +0200 Subject: [PATCH 2/3] Update troubleshoot ingresses Signed-off-by: Gloria Ciavarrini --- documentation/latest/dev/guide.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/documentation/latest/dev/guide.md b/documentation/latest/dev/guide.md index 2c6c505..5334208 100644 --- a/documentation/latest/dev/guide.md +++ b/documentation/latest/dev/guide.md @@ -285,7 +285,7 @@ If you encounter a `404 Not Found` error while executing the [mvn verify](#execute-integration-test-against-kind-cluster) command: ```bash -[OkHttp http://172.19.0.2/...] INFO com.redhat.parodos.sdkutils.SdkUtils - onFailure Message: Not Found +[OkHttp http://172.19.0.2/...] INFO com.redhat.parodos.sdkutils.WorkFlowServiceUtils - onFailure Message: Not Found HTTP response code: 404 HTTP response body: 404 Not Found @@ -297,13 +297,15 @@ HTTP response body: ``` To troubleshoot this issue, you should verify the availability of the -`parodos-ingress` in your cluster. You can use the command `kubectl get ingress` -to check if the ingress is present. +`parodos-notification-ingress` and `parodos-workflow-ingress` in your cluster. +You can use the command `kubectl get ingress` to check if the ingresses +are present. ```bash > kubectl get ingress -NAME CLASS HOSTS ADDRESS PORTS AGE -parodos-ingress * 80 9s +NAME CLASS HOSTS ADDRESS PORTS AGE +parodos-notification-ingress notification-service.parodos-dev 80 5s +parodos-workflow-ingress workflow-service.parodos-dev 80 5s ``` If the ingress is missing, you can manually apply it using the command: From 91c30096dc1523552699a7bccba2dbb1ff3d9405 Mon Sep 17 00:00:00 2001 From: Gloria Ciavarrini Date: Wed, 7 Jun 2023 09:39:40 +0200 Subject: [PATCH 3/3] Fix: typo `/etc/hosts` Signed-off-by: Gloria Ciavarrini --- documentation/latest/dev/guide.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/documentation/latest/dev/guide.md b/documentation/latest/dev/guide.md index 5334208..64fc5ab 100644 --- a/documentation/latest/dev/guide.md +++ b/documentation/latest/dev/guide.md @@ -125,7 +125,7 @@ mvn verify -pl integration-tests -P integration-test -Dspring.profiles.active=de ``` Please note that `WORKFLOW_SERVICE_HOST` and `NOTIFICATION_SERVICE_HOST` are -the `Ingress` hosts defined in your `/tct/hosts` and in [ingress.yaml](https://github.com/parodos-dev/parodos/blob/main/hack/manifests/testing/ingress.yaml). +the `Ingress` hosts defined in your `/etc/hosts` and in [ingress.yaml](https://github.com/parodos-dev/parodos/blob/main/hack/manifests/testing/ingress.yaml). They ensure that the integration tests communicate with the correct services. By combining the `integration-test` Maven profile with the `dev` Spring