truncate helptext
This commit is contained in:
parent
4b19798b58
commit
6d8acdea9f
9 changed files with 102 additions and 44 deletions
|
|
@ -1,4 +1,11 @@
|
|||
#!/bin/sh
|
||||
# Test1: backend and cli basic functionality
|
||||
# Start backend server
|
||||
# Add an ethernet interface and an address
|
||||
# Show configuration
|
||||
# Validate without a mandatory type
|
||||
# Set the mandatory type
|
||||
# Commit
|
||||
|
||||
# include err() and new() functions
|
||||
. ./lib.sh
|
||||
|
|
@ -6,27 +13,41 @@
|
|||
# kill old backend (if any)
|
||||
new "kill old backend"
|
||||
sudo clixon_backend -zf $clixon_cf
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
err
|
||||
fi
|
||||
new "start backend"
|
||||
# start new backend
|
||||
sudo clixon_backend -If $clixon_cf -x 0
|
||||
sudo clixon_backend -If $clixon_cf -x 0 # -x 1 with xmldb proxy
|
||||
if [ $? -ne 0 ]; then
|
||||
err
|
||||
fi
|
||||
new "cli configure"
|
||||
clifn "clixon_cli -1f $clixon_cf set interfaces interface eth0" ""
|
||||
expectfn "clixon_cli -1f $clixon_cf set interfaces interface eth0" ""
|
||||
|
||||
new "cli show configuration"
|
||||
clifn "clixon_cli -1f $clixon_cf show conf cli" "interfaces interface name eth0
|
||||
interfaces interface enabled true"
|
||||
expectfn "clixon_cli -1f $clixon_cf show conf cli" "^interfaces interface name eth0
|
||||
interfaces interface enabled true$"
|
||||
|
||||
new "cli failed validate"
|
||||
expectfn "clixon_cli -1f $clixon_cf -l o validate" "Validate failed"
|
||||
|
||||
new "cli configure more"
|
||||
expectfn "clixon_cli -1f $clixon_cf set interfaces interface eth0 ipv4 address 1.2.3.4 prefix-length 24" ""
|
||||
expectfn "clixon_cli -1f $clixon_cf set interfaces interface eth0 type bgp" ""
|
||||
|
||||
new "cli commit"
|
||||
expectfn "clixon_cli -1f $clixon_cf -l o commit" ""
|
||||
|
||||
new "Kill backend"
|
||||
# Check if still alive
|
||||
pid=`pgrep clixon_backend`
|
||||
if [ -z "$pid" ]; then
|
||||
err "backend already dead"
|
||||
fi
|
||||
# kill backend
|
||||
sudo clixon_backend -zf $clixon_cf
|
||||
if [ $? -ne 0 ]; then
|
||||
err
|
||||
err "kill backend"
|
||||
fi
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue