Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TE_BASE, actual content does not match docs #621

Open
velle opened this issue Jul 4, 2024 · 2 comments
Open

TE_BASE, actual content does not match docs #621

velle opened this issue Jul 4, 2024 · 2 comments
Assignees

Comments

@velle
Copy link

velle commented Jul 4, 2024

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
@velle
Copy link
Author

velle commented Jul 4, 2024

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.

@dstenger
Copy link
Contributor

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?

@dstenger dstenger added this to CITE Aug 1, 2024
@dstenger dstenger moved this to To do in CITE Aug 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: To do
Development

No branches or pull requests

3 participants