Docker container for the TesTcl F5 iRule unit test library
2.9K
Docker container for testing iRules with TesTcl
The docker image uses adoptopenjdk/openjdk11-openj9:alpine-slim
Docker Hub Link: https://hub.docker.com/r/jones2748/docker-testcl
$ git clone https://github.com/joxz/docker-testcl
$ cd docker-testcl
$ docker build -t docker-testcl .
# check docker images
$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
docker-testcl latest 8f42d87ed70b 3 minutes ago 248MB
<none> <none> 6da68286e681 3 minutes ago 21.9MB
<none> <none> 45ce6affa404 45 minutes ago 248MB
Leftover images (those named <none>) from the multistage build process can be deleted with docker image prune
$ docker pull jones2748/docker-testcl:latest
When running TesTcl against an iRule, a host directory containing irule and test has to be mounted into /app at the container.
$ docker run -it --rm -v /hostdir/myirule:/app docker-testcl jtcl /app/test_myirule.tcl
Note: The container directory HAS to be /app, because it's the location where the dockerfile WORKDIRis set, and 'jtcl' doesn't handle being called from another path very well.
e.g. jtcl /app/tests/test_my_irule doesn't work correctly unless you cd /app/tests first
Builtin test for the jtcl irule extension:
$ docker run -it --rm docker-testcl test
The jtcl-irule extension has successfully been installed
$ docker run -it --rm docker-testcl test_irule
**************************************************************************
* it should handle request using pool bar
**************************************************************************
-> Test ok
**************************************************************************
* it should handle request using pool foo
**************************************************************************
-> Test ok
**************************************************************************
* it should replace existing Vary http response headers with Accept-Encoding value
**************************************************************************
verification of 'there should be only one Vary header' done.
verification of 'there should be Accept-Encoding value in Vary header' done.
-> Test ok
$ docker run -it --rm docker-testcl
/app $ whoami
testcl
$ docker run -it --rm docker-testcl makemeroot
/app # whoami
root
$ make
build build container
build-no-cache build container without cache
clean remove images
help this help
inspect inspect container properties - pretty: 'make inspect | jq .' requires jq
logs show docker logs for container (ONLY possible while container is running)
run run container
test test container with builtin tests
jtcl without changing directory firstContent type
Image
Digest
Size
212.9 MB
Last updated
about 6 years ago
docker pull jones2748/docker-testcl