Sign inSign up

xenonmiddleware/fixed-client

By xenonmiddleware

•Updated over 6 years ago

Image which will run the Xenon fixed client environment tests

Image
0

1.3K

xenonmiddleware/fixed-client repository overview

Image which will run the Xenon⁠ fixed client environment tests.

Will startup Docker containers to test against.

⁠Build with:

cd fixed-client
docker build -t xenonmiddleware/fixed-client .

⁠Run with

To run the Xenon fixed client environment tests⁠ run from Xenon repo root dir run with:

cd xenon
MYDOCKERGID=`cut -d: -f3 < <(getent group docker)`
docker run \
    --env MYUID=$UID \
    --env DOCKERGID=$MYDOCKERGID \
    --network host \
    --volume $HOME/.gradle:/home/xenon/.gradle \
    --volume $HOME/.m2:/home/xenon/.m2 \
    --volume /var/run/docker.sock:/var/run/docker.sock \
    --volume $PWD:/code \
    --tty --interactive --rm \
    --name=xenon-fixed-client \
    xenonmiddleware/fixed-client

The above command breaks down as follows:

MYDOCKERGID=`cut -d: -f3 < <(getent group docker)`
docker run \
    # The tests will output files which will be owned by my UID (the UID outside of the container)
    --env MYUID=$UID \
    # To communicate with docker daemon the group of the docker user must be the same
    --env DOCKERGID=$MYDOCKERGID \
    # Tests will start other Docker containers, by using network=host the ports of sibling containers (slurm, sftp, etc.) are accessible by this Docker container.
    --network host \
    # Use gradle cache from outside container, so no new downloads are required
    --volume $HOME/.gradle:/home/xenon/.gradle \
    # Use maven cache from outside container, so no new downloads are required. (Maven cache is used by gradle plugins)
    --volume $HOME/.m2:/home/xenon/.m2 \
    # Tests will start other Docker containers, so will use the local Docker daemon inside this container
    --volume /var/run/docker.sock:/var/run/docker.sock \
    # Code on which to run the gradle test task
    --volume $PWD:/code \
    --tty --interactive --rm \
    --name=xenon-fixed-client \
    xenonmiddleware/fixed-client

By default, xenonmiddleware/fixed-client will run ./gradlew --no-daemon fixedClientEnvironmentTest; to run a different command, append the CMD you want to run, for example:

cd xenon
MYDOCKERGID=`cut -d: -f3 < <(getent group docker)`
docker run \
    --env MYUID=$UID \
    --env DOCKERGID=$MYDOCKERGID \
    --network host \
    --volume $HOME/.gradle:/home/xenon/.gradle \
    --volume $HOME/.m2:/home/xenon/.m2 \
    --volume /var/run/docker.sock:/var/run/docker.sock \
    --volume $PWD:/code \
    --tty --interactive --rm \
    --name=xenon-fixed-client \
    xenonmiddleware/fixed-client \
    ./gradlew --no-daemon fixedClientEnvironmentTest --tests=*agent*

This will only run tests which contain the string agent in their package or class name.

Tag summary

Content type

Image

Digest

Size

526.2 MB

Last updated

over 6 years ago

docker pull xenonmiddleware/fixed-client