hlr: add f_vty_subscr_show_nomatch()
Allow to check if a certain pattern does not match the "show subscriber" output. This will be used by upcoming tests for the check IMEI GSUP message type, to check if the IMEI was not stored, depending on the OsmoHLR configuration. Change-Id: I176d8fd2ee74e1eb7ac797f931cd6005d398740f
This commit is contained in:
parent
61edb7e974
commit
141620d343
|
@ -302,6 +302,14 @@ function f_vty_transceive_match(TELNETasp_PT pt, charstring cmd, template charst
|
|||
}
|
||||
}
|
||||
|
||||
function f_vty_transceive_nomatch(TELNETasp_PT pt, charstring cmd, template charstring exp_ret) {
|
||||
var charstring ret := f_vty_transceive_ret(pt, cmd);
|
||||
if (match(ret, exp_ret)) {
|
||||
setverdict(fail, "Matching VTY response: ", ret, ", should *not* have matched: ", exp_ret);
|
||||
mtc.stop;
|
||||
}
|
||||
}
|
||||
|
||||
private template (value) charstring t_subscr_prefix(hexstring imsi) :=
|
||||
"subscriber imsi " & hex2str(imsi) & " ";
|
||||
|
||||
|
@ -351,6 +359,11 @@ function f_vty_subscr_show(TELNETasp_PT VTY, HlrSubscriber sub, template charstr
|
|||
f_vty_transceive_match(VTY, prefix & "show", exp);
|
||||
}
|
||||
|
||||
/* perform 'show' on subscriber; result must not match with pattern 'exp' */
|
||||
function f_vty_subscr_show_nomatch(TELNETasp_PT VTY, HlrSubscriber sub, template charstring exp) {
|
||||
var charstring prefix := valueof(t_subscr_prefix(sub.imsi));
|
||||
f_vty_transceive_nomatch(VTY, prefix & "show", exp);
|
||||
}
|
||||
|
||||
/***********************************************************************
|
||||
* Helper functions for ConnHdlr
|
||||
|
|
Loading…
Reference in New Issue