Change in ...osmo-ttcn3-hacks[master]: hlr: add f_vty_subscr_show_nomatch()

laforge gerrit-no-reply at lists.osmocom.org
Thu Jun 13 09:35:05 UTC 2019


laforge has submitted this change and it was merged. ( https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/14401 )

Change subject: hlr: add f_vty_subscr_show_nomatch()
......................................................................

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
---
M hlr/HLR_Tests.ttcn
1 file changed, 13 insertions(+), 0 deletions(-)

Approvals:
  laforge: Looks good to me, approved
  fixeria: Looks good to me, but someone else must approve
  Jenkins Builder: Verified



diff --git a/hlr/HLR_Tests.ttcn b/hlr/HLR_Tests.ttcn
index b6bd1ad..e58515b 100644
--- a/hlr/HLR_Tests.ttcn
+++ b/hlr/HLR_Tests.ttcn
@@ -302,6 +302,14 @@
 	}
 }
 
+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 @@
 	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

-- 
To view, visit https://gerrit.osmocom.org/c/osmo-ttcn3-hacks/+/14401
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-ttcn3-hacks
Gerrit-Branch: master
Gerrit-Change-Id: I176d8fd2ee74e1eb7ac797f931cd6005d398740f
Gerrit-Change-Number: 14401
Gerrit-PatchSet: 4
Gerrit-Owner: osmith <osmith at sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <axilirator at gmail.com>
Gerrit-Reviewer: laforge <laforge at gnumonks.org>
Gerrit-Reviewer: osmith <osmith at sysmocom.de>
Gerrit-Reviewer: pespin <pespin at sysmocom.de>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190613/c0482449/attachment.html>


More information about the gerrit-log mailing list