fixing version dependencies in tests

This commit is contained in:
Olof hagsand 2021-02-27 11:36:20 +01:00
parent 2d141b7dff
commit 08e212efef
8 changed files with 20 additions and 22 deletions

View file

@ -31,9 +31,10 @@
The 5.0.0 release is a new major release. The last major release was The 5.0.0 release is a new major release. The last major release was
4.0.0 in 13 July 2019. Recently, large changes to RESTCONF 4.0.0 in 13 July 2019. Recently, large changes to RESTCONF
configuration has been made which is the primary reason for a new configuration has been made which is the primary reason for a new major version.
major version. Other changes include NETCONF call home and a new
client API, and a changed lock behavior. Other changes since 4.9 include NETCONF call home and a new
client API, and a modified lock behavior.
Thanks Netgate and clixon community input for making this possible! Thanks Netgate and clixon community input for making this possible!

View file

@ -58,3 +58,6 @@ WWWDIR=@wwwdir@
# Top src dir # Top src dir
TOP_SRCDIR=@top_srcdir@ TOP_SRCDIR=@top_srcdir@
# Clixon version
CLIXON_VERSION=@CLIXON_VERSION@

View file

@ -27,9 +27,6 @@
# in either the environment or the site.sh, then the default SKIPLIST is empty. # in either the environment or the site.sh, then the default SKIPLIST is empty.
: ${SKIPLIST:=""} : ${SKIPLIST:=""}
# Some tests (openconfig/yang_models) just test for the cli to return a version
version=4
>&2 echo "Running $testfile" >&2 echo "Running $testfile"
# Generated config file from autotools / configure # Generated config file from autotools / configure
@ -40,7 +37,6 @@ if [ -f ./config.sh ]; then
fi fi
fi fi
# Test number from start # Test number from start
: ${testnr:=0} : ${testnr:=0}

View file

@ -100,9 +100,8 @@ new "Openconfig test: $clixon_cli -1f $cfg -y $f show version ($m modules)"
for f in $files; do for f in $files; do
if [ -n "$(head -1 $f|grep '^module')" ]; then if [ -n "$(head -1 $f|grep '^module')" ]; then
new "$clixon_cli -D $DBG -1f $cfg -y $f show version" new "$clixon_cli -D $DBG -1f $cfg -y $f show version"
expectpart "$($clixon_cli -D $DBG -1f $cfg -y $f show version)" 0 "$version." expectpart "$($clixon_cli -D $DBG -1f $cfg -y $f show version)" 0 "${CLIXON_VERSION}"
fi fi
done done
rm -rf $dir rm -rf $dir

View file

@ -61,7 +61,7 @@ EOF
fi fi
new "$clixon_cli -1f $cfg show version" new "$clixon_cli -1f $cfg show version"
expectpart "$($clixon_cli -1f $cfg show version)" 0 "$version." expectpart "$($clixon_cli -1f $cfg show version)" 0 "${CLIXON_VERSION}"
new "hello session-id 2" new "hello session-id 2"
expecteof "$clixon_util_socket -a $family -s $sock -D $DBG" 0 "<hello $DEFAULTNS/>" "<hello $DEFAULTNS><session-id>3</session-id></hello>" expecteof "$clixon_util_socket -a $family -s $sock -D $DBG" 0 "<hello $DEFAULTNS/>" "<hello $DEFAULTNS><session-id>3</session-id></hello>"

View file

@ -157,7 +157,7 @@ if [ "$BE" -ne 0 ]; then
fi fi
new "cli defined extension" new "cli defined extension"
expectpart "$($clixon_cli -1f $cfg show version)" 0 "$version." expectpart "$($clixon_cli -1f $cfg show version)" 0 "${CLIXON_VERSION}"
new "empty values in leaf-list" new "empty values in leaf-list"
expecteof "$clixon_netconf -qf $cfg" 0 "<rpc $DEFAULTNS><edit-config><target><candidate/></target><config><x xmlns=\"urn:example:clixon\"><f><e>a</e></f></x></config></edit-config></rpc>]]>]]>" "^<rpc-reply $DEFAULTNS><ok/></rpc-reply>]]>]]>$" expecteof "$clixon_netconf -qf $cfg" 0 "<rpc $DEFAULTNS><edit-config><target><candidate/></target><config><x xmlns=\"urn:example:clixon\"><f><e>a</e></f></x></config></edit-config></rpc>]]>]]>" "^<rpc-reply $DEFAULTNS><ok/></rpc-reply>]]>]]>$"

View file

@ -43,35 +43,34 @@ EOF
new "yangmodels parse: -f $cfg" new "yangmodels parse: -f $cfg"
new "yangmodel Experimental IEEE 802.1: $YANGMODELS/experimental/ieee/802.1" new "yangmodel Experimental IEEE 802.1: $YANGMODELS/experimental/ieee/802.1"
expectpart "$($clixon_cli -D $DBG -1f $cfg -o CLICON_YANG_MAIN_DIR=$YANGMODELS/experimental/ieee/802.1 -p $YANGMODELS/experimental/ieee/1588 show version)" 0 "$version." expectpart "$($clixon_cli -D $DBG -1f $cfg -o CLICON_YANG_MAIN_DIR=$YANGMODELS/experimental/ieee/802.1 -p $YANGMODELS/experimental/ieee/1588 show version)" 0 "${CLIXON_VERSION}"
new "yangmodel Experimental IEEE 1588: $YANGMODELS/experimental/ieee/1588" new "yangmodel Experimental IEEE 1588: $YANGMODELS/experimental/ieee/1588"
expectpart "$($clixon_cli -D $DBG -1f $cfg -o CLICON_YANG_MAIN_DIR=$YANGMODELS/experimental/ieee/1588 show version)" 0 "$version." expectpart "$($clixon_cli -D $DBG -1f $cfg -o CLICON_YANG_MAIN_DIR=$YANGMODELS/experimental/ieee/1588 show version)" 0 "${CLIXON_VERSION}"
# Standard IEEE # Standard IEEE
new "yangmodel Standard IEEE 802.1: $YANGMODELS/standard/ieee/draft/802.1/ABcu" new "yangmodel Standard IEEE 802.1: $YANGMODELS/standard/ieee/draft/802.1/ABcu"
expectpart "$($clixon_cli -D $DBG -1f $cfg -o CLICON_YANG_MAIN_DIR=$YANGMODELS/standard/ieee/draft/802.1/ABcu show version)" 0 "$version." expectpart "$($clixon_cli -D $DBG -1f $cfg -o CLICON_YANG_MAIN_DIR=$YANGMODELS/standard/ieee/draft/802.1/ABcu show version)" 0 "${CLIXON_VERSION}"
new "yangmodel Standard IEEE 802.1: $YANGMODELS/standard/ieee/draft/802.1/Qcr" new "yangmodel Standard IEEE 802.1: $YANGMODELS/standard/ieee/draft/802.1/Qcr"
expectpart "$($clixon_cli -D $DBG -1f $cfg -o CLICON_YANG_MAIN_DIR=$YANGMODELS/standard/ieee/draft/802.1/Qcr show version)" 0 "$version." expectpart "$($clixon_cli -D $DBG -1f $cfg -o CLICON_YANG_MAIN_DIR=$YANGMODELS/standard/ieee/draft/802.1/Qcr show version)" 0 "${CLIXON_VERSION}"
new "yangmodel Standard IEEE 802.1: $YANGMODELS/standard/ieee/draft/802.1/Qcw" new "yangmodel Standard IEEE 802.1: $YANGMODELS/standard/ieee/draft/802.1/Qcw"
expectpart "$($clixon_cli -D $DBG -1f $cfg -o CLICON_YANG_MAIN_DIR=$YANGMODELS/standard/ieee/draft/802.1/Qcw show version)" 0 "$version." expectpart "$($clixon_cli -D $DBG -1f $cfg -o CLICON_YANG_MAIN_DIR=$YANGMODELS/standard/ieee/draft/802.1/Qcw show version)" 0 "${CLIXON_VERSION}"
new "yangmodel Standard IEEE 802.1: $YANGMODELS/standard/ieee/draft/802.1/Qcx" new "yangmodel Standard IEEE 802.1: $YANGMODELS/standard/ieee/draft/802.1/Qcx"
expectpart "$($clixon_cli -D $DBG -1f $cfg -o CLICON_YANG_MAIN_DIR=$YANGMODELS/standard/ieee/draft/802.1/Qcx -p $YANGMODELS/standard/ieee/draft/802.1/ABcu show version)" 0 "$version." expectpart "$($clixon_cli -D $DBG -1f $cfg -o CLICON_YANG_MAIN_DIR=$YANGMODELS/standard/ieee/draft/802.1/Qcx -p $YANGMODELS/standard/ieee/draft/802.1/ABcu show version)" 0 "${CLIXON_VERSION}"
new "yangmodel Standard IEEE 802.1: $YANGMODELS/standard/ieee/draft/802.1/x" new "yangmodel Standard IEEE 802.1: $YANGMODELS/standard/ieee/draft/802.1/x"
expectpart "$($clixon_cli -D $DBG -1f $cfg -o CLICON_YANG_MAIN_DIR=$YANGMODELS/standard/ieee/draft/802.1/x show version)" 0 "$version." expectpart "$($clixon_cli -D $DBG -1f $cfg -o CLICON_YANG_MAIN_DIR=$YANGMODELS/standard/ieee/draft/802.1/x show version)" 0 "${CLIXON_VERSION}"
# Published # Published
new "yangmodel Standard IEEE 802.1: $YANGMODELS/standard/ieee/published/802.1" new "yangmodel Standard IEEE 802.1: $YANGMODELS/standard/ieee/published/802.1"
expectpart "$($clixon_cli -D $DBG -1f $cfg -o CLICON_YANG_MAIN_DIR=$YANGMODELS/standard/ieee/published/802.1 show version)" 0 "$version." expectpart "$($clixon_cli -D $DBG -1f $cfg -o CLICON_YANG_MAIN_DIR=$YANGMODELS/standard/ieee/published/802.1 show version)" 0 "${CLIXON_VERSION}"
new "yangmodel Standard IEEE 802.1: $YANGMODELS/standard/ieee/published/802.3" new "yangmodel Standard IEEE 802.1: $YANGMODELS/standard/ieee/published/802.3"
expectpart "$($clixon_cli -D $DBG -1f $cfg -o CLICON_YANG_MAIN_DIR=$YANGMODELS/standard/ieee/published/802.3 show version)" 0 "$version." expectpart "$($clixon_cli -D $DBG -1f $cfg -o CLICON_YANG_MAIN_DIR=$YANGMODELS/standard/ieee/published/802.3 show version)" 0 "${CLIXON_VERSION}"
rm -rf $dir rm -rf $dir

View file

@ -43,6 +43,6 @@ EOF
# Standard IETF # Standard IETF
new "yangmodel Standard IETF: $YANGMODELS/standard/ietf/RFC" new "yangmodel Standard IETF: $YANGMODELS/standard/ietf/RFC"
echo "$clixon_cli -D $DBG -1f $cfg -o CLICON_YANG_MAIN_DIR=$YANGMODELS/standard/ietf/RFC show version" echo "$clixon_cli -D $DBG -1f $cfg -o CLICON_YANG_MAIN_DIR=$YANGMODELS/standard/ietf/RFC show version"
expectpart "$($clixon_cli -D $DBG -1f $cfg -o CLICON_YANG_MAIN_DIR=$YANGMODELS/standard/ietf/RFC show version)" 0 "$version." expectpart "$($clixon_cli -D $DBG -1f $cfg -o CLICON_YANG_MAIN_DIR=$YANGMODELS/standard/ietf/RFC show version)" 0 "${CLIXON_VERSION}"
rm -rf $dir rm -rf $dir