Renamed clixon-system container to clixon-test
This commit is contained in:
parent
bc6cc2b31f
commit
21785a5d3e
4 changed files with 12 additions and 19 deletions
|
|
@ -31,7 +31,7 @@
|
||||||
#
|
#
|
||||||
# ***** END LICENSE BLOCK *****
|
# ***** END LICENSE BLOCK *****
|
||||||
#
|
#
|
||||||
# Build, compile and test a clixon-system container
|
# Build, compile and test a clixon-test container
|
||||||
# This is used in CI
|
# This is used in CI
|
||||||
# NOTE: restconf config is controlled at install time with ./configure --with-restconf=... option
|
# NOTE: restconf config is controlled at install time with ./configure --with-restconf=... option
|
||||||
|
|
||||||
|
|
@ -52,7 +52,7 @@ endif
|
||||||
#DOCKERFLAGS="--no-cache"
|
#DOCKERFLAGS="--no-cache"
|
||||||
|
|
||||||
# Example docker image. CHANGE THIS IF YOU PUSH
|
# Example docker image. CHANGE THIS IF YOU PUSH
|
||||||
IMG = clixon/clixon-system
|
IMG = clixon/clixon-test
|
||||||
|
|
||||||
SHELL = /bin/sh
|
SHELL = /bin/sh
|
||||||
|
|
||||||
|
|
@ -77,13 +77,13 @@ docker: clixon $(DOCKERFILE)
|
||||||
push:
|
push:
|
||||||
sudo docker push $(IMG)
|
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 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
|
# Note when start.sh is completed, the internal startsystem.sh script may still be running
|
||||||
# therefore the sleep 1 before tests start
|
# therefore the sleep 1 before tests start
|
||||||
test: docker
|
test: docker
|
||||||
./cleanup.sh ; ./start.sh # kill (ignore error) and the start it
|
./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:
|
depend:
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ How to run the tests:
|
||||||
$ make test
|
$ make test
|
||||||
```
|
```
|
||||||
|
|
||||||
How to build and start the container (called clixon-system):
|
How to build and start the container (called clixon-test):
|
||||||
```
|
```
|
||||||
$ make docker
|
$ make docker
|
||||||
$ ./start.sh
|
$ ./start.sh
|
||||||
|
|
@ -43,11 +43,11 @@ Example:
|
||||||
Once running you can access it in different ways as follows:
|
Once running you can access it in different ways as follows:
|
||||||
As CLI:
|
As CLI:
|
||||||
```
|
```
|
||||||
$ sudo docker exec -it clixon-system clixon_cli
|
$ sudo docker exec -it clixon-test clixon_cli
|
||||||
```
|
```
|
||||||
As netconf via stdin/stdout:
|
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:
|
As restconf using curl on exposed port 80:
|
||||||
```
|
```
|
||||||
|
|
@ -62,7 +62,7 @@ As restconf using curl on exposed port 80:
|
||||||
```
|
```
|
||||||
Or run tests:
|
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:
|
To check status and then kill it:
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,4 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# Kill all controller containers (optionally do `make clean`)
|
# 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
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -86,13 +86,9 @@ CONFIG=${CONFIG:-$CONFIG0}
|
||||||
|
|
||||||
# Start clixon-example backend
|
# Start clixon-example backend
|
||||||
>&2 echo -n "Starting 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
|
# Wait for snmpd to start
|
||||||
sudo docker exec -t clixon-system bash -c 'while [ ! -S /var/run/snmp.sock ]; do sleep 1; done'
|
sudo docker exec -t clixon-test bash -c 'while [ ! -S /var/run/snmp.sock ]; do sleep 1; done'
|
||||||
|
|
||||||
>&2 echo "clixon-system started"
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
>&2 echo "clixon-test started"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue