opengeospatial/teamengine

TE_BASE, actual content does not match docs

velle opened this issue · 2 comments

Regarding https://opengeospatial.github.io/teamengine/installation.html, mainly sections "Build with Maven" and "Set up an instance directory (TE_BASE)".

First of, I'm a bit confused about what the docs actually instruct me to do. I believe it instructs me to define a TE_BASE environment variable, and then manually create a TE_BASE folder and unpack teamengine-console-${project.version}-base into that. However, that was automatically done when I ran mvn package (defaulting to use ~/teamengine as TE_BASE).

However, the content/structure of that archive (and corresponding folder) is not the same as outlined in the docs.

Content of teamengine-console-6.0.0-SNAPSHOT-base.zip:

$ tree -L 1 ~/teamengine
/home/velle/teamengine
├── scripts
├── users
└── work

Content of teamengine-console-6.0.0-SNAPSHOT-bin.zip:

├── bin
├── lib
├── resources
└── README.txt

Also, there is no config.xml in any of the archives. But I did find one in ~/repos/teamengine/teamengine-console/src/main/scripts/ctl/note/1.0/config.xml. Is that the one?

What I'm trying to do

I don't intend to use teamengine with Tomcat (as a webservice), only as a command line tool. The milestone I am aiming for now is being able to run listsuites.sh without errors, but I have not succeeded yet. I have mainly been fiddling with piecing together the two archives and the config.xml, into TE_BASE. I have not yet installed any test suites, but eventually I will install ets-gpkg12.

Issue with either build process or with docs

I am guessing there is a bug/issue with the mvn package process?

If that is not the case, then at least the docs don't match the actual behavior of the mvn package process.

Or at the very least, I just don't understand the docs properly :)

Details

  • teamengine 6.0.0-RC1-1-g01ff166e, source cloned from github
  • Ubuntu 22.04
  • openjdk 17.0.11 2024-04-16
  • Apache Maven 3.6.3

I succeeded in running testsuites.sh :)

It seems TE_BASE can be pieced together from the two archives, and then moving config.xml. The following script does the trick for me.

There are some files that exist in both archives, but I checked, and they are identical.

build_TE_BASE.sh

#!/usr/bin/env bash
if [[ -z "$TE_BASE" ]]; then
    echo "Must provide TE_BASE in environment. " 1>&2
    exit 1
fi
if [[ -z "$TE_REPO" ]]; then
    echo "Must provide TE_REPO (local teamengine github repository) in environment" 1>&2
    exit 1
fi

rm $TE_BASE/* -rf
mkdir -p $TE_BASE
unzip $TE_REPO/teamengine-console/target/teamengine-console-6.0.0-SNAPSHOT-base.zip -d $TE_BASE
unzip -o $TE_REPO/teamengine-console/target/teamengine-console-6.0.0-SNAPSHOT-bin.zip -d $TE_BASE
cp $TE_BASE/scripts/note/1.0/config.xml $TE_BASE/.

Demonstration:

$ cd ~
$ export TE_BASE=~/teamengine
$ export TE_REPO=~/repos/teamengine
$ bash build_TE_BASE.sh
$ bash teamengine/bin/unix/listsuites.sh
Source: /home/velle/teamengine/scripts/note/1.0/ctl/note.ctl
  Suite note:note-test ({http://example.net/note-test}note-test)
  Title: Sample test suite
  Description: Checks the content of a note.

Thank you for reporting. The documentation might be outdated here. We will check it.

A good template how to setup TEAM Engine with a test suite is always one of the Dockerfiles (e.g. ets-gpkg12): https://github.com/opengeospatial/ets-gpkg12/blob/master/src/docker/Dockerfile

Do you have any further questions about setting up TEAM Engine?