From a5514e051c30229e38cdea26a08b0373f038047c Mon Sep 17 00:00:00 2001 From: stass Date: Wed, 29 Mar 2023 18:05:51 +0300 Subject: [PATCH] fix test --- test/test_snmp_union.sh | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/test/test_snmp_union.sh b/test/test_snmp_union.sh index 81dfdccb..bb27c01c 100644 --- a/test/test_snmp_union.sh +++ b/test/test_snmp_union.sh @@ -72,8 +72,11 @@ module clixon-example{ smiv2:oid "1.3.6.1.2.1.47.1.1.1"; list parameter{ smiv2:oid "1.3.6.1.2.1.47.1.1.1.1"; - key name; - + key index; + leaf index{ + type int32; + smiv2:oid "1.3.6.1.2.1.47.1.1.1.1.1"; + } leaf name{ type union{ type ex:first; @@ -81,7 +84,7 @@ module clixon-example{ type ex:third; } description "name"; - smiv2:oid "1.3.6.1.2.1.47.1.1.1.1.1"; + smiv2:oid "1.3.6.1.2.1.47.1.1.1.1.2"; } } } @@ -93,13 +96,16 @@ EOF cat < $fstate - first + 1 + first - second + 2 + second - third + 3 + third
EOF @@ -152,10 +158,8 @@ function testexit(){ ENTITY_OID=".1.3.6.1.2.1.47.1.1.1" -expectpart "$($snmpwalk $ENTITY_OID)" 0 - # first string, value=first -OID_FIRST="${ENTITY_OID}.1.1" +OID_FIRST="${ENTITY_OID}.1.1.1" # second string, value=second OID_SECOND="${ENTITY_OID}.1.1.2" # third string, value=third