Renamed clixon-system container to clixon-test

This commit is contained in:
Olof hagsand 2023-01-15 13:27:38 +01:00
parent bc6cc2b31f
commit 21785a5d3e
4 changed files with 12 additions and 19 deletions

View file

@ -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:

View file

@ -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:

View file

@ -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

View file

@ -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"