opengeospatial / ets-ogcapi-processes10

Other
3 stars 3 forks source link

Unable to run the test from the command line #36

Closed gfenoy closed 1 year ago

gfenoy commented 1 year ago

Describe the bug

From the documentation we can read that the test suite can be run from the command line using the following command:

java -jar ets-ogcapi-processes10-${version}-aio.jar [-o|--outputDir $TMPDIR] [test-run-props.xml]

When we run the command bellow, we get the following result.

root@e965f7bd482f:/usr/local/tomcat# java -jar webapps/teamengine/WEB-INF/lib/ets-ogcapi-processes10-0.4-SNAPSHOT.jar --outputDir /tmp test-run-props.xml 
no main manifest attribute, in webapps/teamengine/WEB-INF/lib/ets-ogcapi-processes10-0.4-SNAPSHOT.jar

So, we tried using the following, but with no success:

java -cp webapps/teamengine/WEB-INF/lib/ets-ogcapi-processes10-0.4-SNAPSHOT.jar org.opengis.cite.ogcapiprocesses10.TestNGController --outputDir /tmp test-run-props.xml 
Error: Could not find or load main class org.opengis.cite.ogcapiprocesses10.TestNGController

To Reproduce Build the docker image for the test suite, then run the container.

mkdir CITE
cd CITE
git clone https://github.com/opengeospatial/teamengine src
git clone https://github.com/opengeospatial/ets-common.git src1
cd src1
git clone -b testbed17 https://github.com/opengeospatial/ets-ogcapi-processes10.git
cd ..
docker build . -t teamengine/ogcapi-processes:latest -f src1/ets-ogcapi-processes10/Dockerfile
docker run -d --name cite-teamengine -p 8080:8080 teamengine/ogcapi-processes:latest

Start bash from the running container and try using the provided command.

docker exec -it cite-teamengine bash

Expected behavior The test suite is run and the results are stored in the outputDir passed as argument.

gfenoy commented 1 year ago

This was due to the way the Docker image was built, it was not including the aio.jar.

Using the "aio.jar" as documented just works.