diff --git a/docker/test/Makefile.in b/docker/test/Makefile.in index b11d81f2..1faf066b 100644 --- a/docker/test/Makefile.in +++ b/docker/test/Makefile.in @@ -31,7 +31,7 @@ # # ***** END LICENSE BLOCK ***** # -# Build, compile and test a clixon-system container +# Build, compile and test a clixon-test container # This is used in CI # NOTE: restconf config is controlled at install time with ./configure --with-restconf=... option @@ -52,7 +52,7 @@ endif #DOCKERFLAGS="--no-cache" # Example docker image. CHANGE THIS IF YOU PUSH -IMG = clixon/clixon-system +IMG = clixon/clixon-test SHELL = /bin/sh @@ -77,13 +77,13 @@ docker: clixon $(DOCKERFILE) push: sudo docker push $(IMG) -# Start the clixon system container and run the test script +# Start the clixon test container and run the test script # Note tests will kill the daemons started in the start scrips # Note when start.sh is completed, the internal startsystem.sh script may still be running # therefore the sleep 1 before tests start test: docker ./cleanup.sh ; ./start.sh # kill (ignore error) and the start it - sudo docker exec -t clixon-system bash -c 'cd /usr/local/bin/test && detail=true ./sum.sh' + sudo docker exec -t clixon-test bash -c 'cd /usr/local/bin/test && detail=true ./sum.sh' depend: diff --git a/docker/test/README.md b/docker/test/README.md index d71d4884..e7da1468 100644 --- a/docker/test/README.md +++ b/docker/test/README.md @@ -23,7 +23,7 @@ How to run the tests: $ make test ``` -How to build and start the container (called clixon-system): +How to build and start the container (called clixon-test): ``` $ make docker $ ./start.sh @@ -43,11 +43,11 @@ Example: Once running you can access it in different ways as follows: As CLI: ``` - $ sudo docker exec -it clixon-system clixon_cli + $ sudo docker exec -it clixon-test clixon_cli ``` As netconf via stdin/stdout: ``` - $ sudo docker exec -it clixon-system clixon_netconf -f /usr/local/etc/example.xml + $ sudo docker exec -it clixon-test clixon_netconf -f /usr/local/etc/example.xml ``` As restconf using curl on exposed port 80: ``` @@ -62,7 +62,7 @@ As restconf using curl on exposed port 80: ``` Or run tests: ``` - $ sudo docker exec -it clixon-system bash -c 'cd /usr/local/bin/test && ./all.sh' + $ sudo docker exec -it clixon-test bash -c 'cd /usr/local/bin/test && ./all.sh' ``` To check status and then kill it: diff --git a/docker/test/cleanup.sh b/docker/test/cleanup.sh index ee6d3b0f..3f135cb2 100755 --- a/docker/test/cleanup.sh +++ b/docker/test/cleanup.sh @@ -1,7 +1,4 @@ #!/bin/sh # Kill all controller containers (optionally do `make clean`) -sudo docker kill clixon-system 2> /dev/null # ignore errors - - - +sudo docker kill clixon-test 2> /dev/null # ignore errors diff --git a/docker/test/start.sh b/docker/test/start.sh index 95936506..97813cd9 100755 --- a/docker/test/start.sh +++ b/docker/test/start.sh @@ -86,13 +86,9 @@ CONFIG=${CONFIG:-$CONFIG0} # Start clixon-example backend >&2 echo -n "Starting Backend..." -sudo docker run -p $PORT:80 -p $SPORT:443 --name clixon-system --rm -e DBG=$DBG -e CONFIG="$CONFIG" -e STORE="$STORE" -td clixon/clixon-system || err "Error starting clixon-system" +sudo docker run -p $PORT:80 -p $SPORT:443 --name clixon-test --rm -e DBG=$DBG -e CONFIG="$CONFIG" -e STORE="$STORE" -td clixon/clixon-test || err "Error starting clixon-test" # Wait for snmpd to start -sudo docker exec -t clixon-system bash -c 'while [ ! -S /var/run/snmp.sock ]; do sleep 1; done' - ->&2 echo "clixon-system started" - - - +sudo docker exec -t clixon-test bash -c 'while [ ! -S /var/run/snmp.sock ]; do sleep 1; done' +>&2 echo "clixon-test started"