3 # exercise pmLookupName(), especially with dynamic metrics as
4 # per email enquiry from Martins Innus circa 03 Apr 2015
6 # Copyright (c) 2015 Ken McDonell. All Rights Reserved.
10 echo "QA output created by $seq"
12 # get standard environment, filters and checks
17 status
=1 # failure is the default!
18 $sudo rm -rf $tmp.
* $seq.full
19 trap "cd $here; rm -rf $tmp.*; exit \$status" 0 1 2 3 15
37 cat >$tmp.pmns
<<End-of-File
54 # real QA test starts here
56 echo "simple error cases ..."
59 src
/lookupnametest sampledso.no.such.name
61 src
/lookupnametest bad.metric.name
63 src
/lookupnametest sampledso.long.one sampledso.no.such.name sampledso.long.ten bad.metric.name
65 src
/lookupnametest
-n $tmp.pmns sampledso.long.one sampledso.no.such.name sampledso.long.ten bad.metric.name | _filter_tmp
68 echo "simple cases ..."
69 src
/lookupnametest sampledso.drift
71 $sudo_local_ctx src
/lookupnametest
-L sampledso.drift
73 src
/lookupnametest
-h $host sampledso.drift | _filter_host
75 src
/lookupnametest
-a archives
/dynmetric sampledso.drift
77 src
/lookupnametest
-n $tmp.pmns sampledso.drift | _filter_tmp
80 echo "add non-terminal ..."
81 src
/lookupnametest sampledso.drift sampledso sampledso.bin
83 $sudo_local_ctx src
/lookupnametest
-L sampledso.drift sampledso sampledso.bin
85 src
/lookupnametest
-h $host sampledso.drift sampledso sampledso.bin | _filter_host
87 src
/lookupnametest
-a archives
/dynmetric sampledso.drift sampledso sampledso.bin
90 echo "swap non-terminal for valid dynamic metric ..."
91 src
/lookupnametest sampledso.drift sampledso.secret.bar sampledso.bin
93 $sudo_local_ctx src
/lookupnametest
-L sampledso.drift sampledso.secret.bar sampledso.bin
95 src
/lookupnametest
-h $host sampledso.drift sampledso.secret.bar sampledso.bin | _filter_host
97 src
/lookupnametest
-a archives
/dynmetric sampledso.drift sampledso.secret.bar sampledso.bin
100 echo "swap valid dynamic metric for invalid dynamic metrics ..."
101 src
/lookupnametest sampledso.drift sampledso.secret sampledso.secret.foo.zero sampledso.bin
103 $sudo_local_ctx src
/lookupnametest
-L sampledso.drift sampledso.secret sampledso.secret.foo.zero sampledso.bin
105 src
/lookupnametest
-h $host sampledso.drift sampledso.secret sampledso.secret.foo.zero sampledso.bin | _filter_host
107 src
/lookupnametest
-a archives
/dynmetric sampledso.secret sampledso.drift sampledso.secret.foo.zero sampledso.bin
110 echo "some no agent cases ..."
112 $sudo_local_ctx src
/lookupnametest
-L sampledso.secret.bar sample.secret.bar
114 src
/lookupnametest
-n $tmp.pmns noagent sampledso.bin sampledso.secret.bar | _filter_tmp
116 #$sudo_local_ctx src/lookupnametest -L -n $tmp.pmns noagent | _filter_tmp