aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2018-12-02 18:52:49 +0100
committerNeels Hofmeyr <neels@hofmeyr.de>2018-12-02 20:06:24 +0100
commit8aa780bf80fa4ffde8a5df9d8b87a2e919193f1f (patch)
tree4ead4c7429a1149f1c270af8294ca09da1e7281d /tests
parentf08da2459b53c554b866e64a6d6f6282fa836842 (diff)
add 'show subscriber' command, alias for 'subscriber ... show'
When I wrote the osmo-hlr subscriber command, I failed to heed the common 'show foo' scheme and instead created a 'subscriber [...] show' command. Relieve that weirdness by creating an alias that has 'show' at the start. Arrange string macros so that the 'show subscriber' cmd doesn't end in a space (the SUBSCR macro ends in a space ' ' to implicitly include the space to commands like 'create', 'show', 'update'). Add the new command to test_nodes.vty and test_subscriber.vty. Change-Id: I01ce9b0868302d40ed05c6a588316a194d6071e4
Diffstat (limited to 'tests')
-rw-r--r--tests/test_nodes.vty1
-rw-r--r--tests/test_subscriber.vty8
2 files changed, 9 insertions, 0 deletions
diff --git a/tests/test_nodes.vty b/tests/test_nodes.vty
index a9d4ac4..e1f57a9 100644
--- a/tests/test_nodes.vty
+++ b/tests/test_nodes.vty
@@ -18,6 +18,7 @@ OsmoHLR> list
show talloc-context (application|all) (full|brief|DEPTH) filter REGEXP
show gsup-connections
subscriber (imsi|msisdn|id) IDENT show
+ show subscriber (imsi|msisdn|id) IDENT
OsmoHLR> enable
OsmoHLR# list
diff --git a/tests/test_subscriber.vty b/tests/test_subscriber.vty
index 2da455f..c22f2df 100644
--- a/tests/test_subscriber.vty
+++ b/tests/test_subscriber.vty
@@ -3,6 +3,7 @@ OsmoHLR> enable
OsmoHLR# list
...
subscriber (imsi|msisdn|id) IDENT show
+ show subscriber (imsi|msisdn|id) IDENT
subscriber imsi IDENT create
subscriber (imsi|msisdn|id) IDENT delete
subscriber (imsi|msisdn|id) IDENT update msisdn MSISDN
@@ -33,6 +34,13 @@ OsmoHLR# subscriber id 1 show
OsmoHLR# subscriber msisdn 12345 show
% No subscriber for msisdn = '12345'
+OsmoHLR# show subscriber imsi 123456789023000
+% No subscriber for imsi = '123456789023000'
+OsmoHLR# show subscriber id 1
+% No subscriber for id = '1'
+OsmoHLR# show subscriber msisdn 12345
+% No subscriber for msisdn = '12345'
+
OsmoHLR# subscriber imsi 1234567890230001 create
% Not a valid IMSI: 1234567890230001
OsmoHLR# subscriber imsi 12345678902300x create