Skip to content
This repository was archived by the owner on Jan 19, 2022. It is now read-only.

Local Testing

noelo edited this page May 25, 2020 · 3 revisions

Individual Components can be tested against server components using Telepresence

For example

telepresence --swap-deployment pathfinder-ui

telepresence --swap-deployment pathfinder-server --env-json pathfinder_env.json

Pathfinder UI

First set the requisite environment variable

export PATHFINDER_SERVER=http://pathfinder-server:8080

You can run a local copy of the UI by using the following command

mvn clean package -DdisableTracking=true -DskipTests -Djetty.port=8083 jetty:run

The jetty:run goal is configured to use the values in the web.xml by default to find the server at http://pathfinder-server:8080/api

However this can be changed by uncommenting the following lines in under the jetty-maven-plugin in the pom.xml

<webAppConfig> <overrideDescriptor>src/main/webapp/WEB-INF/override-web.xml</overrideDescriptor> </webAppConfig>

Pathfinder Server

Telepresence can be used to integrate with the UI and DB hosted in OCP using the following command

telepresence --swap-deployment pathfinder-server --env-json pathfinder_env.json

For configuring Intellij look at Telepresence & IntelliJ

Your IDE needs to be configured to run the pathfinder-server app using the following settings.

-Xmx1024m -Dspring.cloud.kubernetes.secrets.enableApi=false -Dspring.profiles.active=swagger,prodose -Dspring.cloud.kubernetes.secrets.name=mongodb -Dspring.cloud.kubernetes.secrets.paths=/tmp/secrets

Clone this wiki locally