From 6bd5d09507a5f8d28f93c43d1221152fd4e6bde9 Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Fri, 3 Mar 2017 22:36:56 +0100 Subject: make python tests pass for new OsmoMSC Change-Id: I59bf6503a2f822e9b6078c0fd24643df9a2dab3c --- openbsc/doc/examples/osmo-msc/osmo-msc.cfg | 20 +---- openbsc/osmoappdesc.py | 9 +- openbsc/src/libbsc/bsc_init.c | 6 -- openbsc/src/libbsc/bsc_vty.c | 30 ------- openbsc/src/libcommon-cs/common_cs_vty.c | 30 +++++++ openbsc/src/osmo-msc/msc_main.c | 4 + openbsc/tests/ctrl_test_runner.py | 108 ----------------------- openbsc/tests/smpp_test_runner.py | 12 +-- openbsc/tests/vty_test_runner.py | 137 ++++++----------------------- 9 files changed, 72 insertions(+), 284 deletions(-) diff --git a/openbsc/doc/examples/osmo-msc/osmo-msc.cfg b/openbsc/doc/examples/osmo-msc/osmo-msc.cfg index 209ddd27b..66083c96c 100644 --- a/openbsc/doc/examples/osmo-msc/osmo-msc.cfg +++ b/openbsc/doc/examples/osmo-msc/osmo-msc.cfg @@ -14,23 +14,5 @@ network encryption a5 0 rrlp mode none mm info 1 - handover 0 - handover window rxlev averaging 10 - handover window rxqual averaging 1 - handover window rxlev neighbor averaging 10 - handover power budget interval 6 - handover power budget hysteresis 3 - handover maximum distance 9999 - timer t3101 10 - timer t3103 0 - timer t3105 0 - timer t3107 0 - timer t3109 4 - timer t3111 0 - timer t3113 60 - timer t3115 0 - timer t3117 0 - timer t3119 0 - timer t3141 0 msc - subscriber-create-on-demand + assign-tmsi diff --git a/openbsc/osmoappdesc.py b/openbsc/osmoappdesc.py index 76f03fc58..170c83bb2 100644 --- a/openbsc/osmoappdesc.py +++ b/openbsc/osmoappdesc.py @@ -34,8 +34,7 @@ app_configs = { "gbproxy": ["doc/examples/osmo-gbproxy/osmo-gbproxy.cfg", "doc/examples/osmo-gbproxy/osmo-gbproxy-legacy.cfg"], "sgsn": ["doc/examples/osmo-sgsn/osmo-sgsn.cfg"], - "nitb": ["doc/examples/osmo-nitb/nanobts/openbsc-multitrx.cfg", - "doc/examples/osmo-nitb/nanobts/openbsc.cfg"], + "msc": ["doc/examples/osmo-msc/osmo-msc.cfg"], "gtphub": ["doc/examples/osmo-gtphub/osmo-gtphub-1iface.cfg"] } @@ -45,11 +44,11 @@ apps = [(4242, "src/osmo-bsc/osmo-bsc", "OsmoBSC", "osmo-bsc"), (4243, "src/osmo-bsc_mgcp/osmo-bsc_mgcp", "OpenBSC MGCP", "mgcp"), (4246, "src/gprs/osmo-gbproxy", "OsmoGbProxy", "gbproxy"), (4245, "src/gprs/osmo-sgsn", "OsmoSGSN", "sgsn"), - (4242, "src/osmo-nitb/osmo-nitb", "OpenBSC", "nitb"), + (4254, "src/osmo-msc/osmo-msc", "OsmoMSC", "msc"), (4253, "src/gprs/osmo-gtphub", "OsmoGTPhub", "gtphub") ] -vty_command = ["./src/osmo-nitb/osmo-nitb", "-c", - "doc/examples/osmo-nitb/nanobts/openbsc.cfg"] +vty_command = ["./src/osmo-msc/osmo-msc", "-c", + "doc/examples/osmo-msc/osmo-msc.cfg"] vty_app = apps[5] # reference apps[] entry for osmo-nitb diff --git a/openbsc/src/libbsc/bsc_init.c b/openbsc/src/libbsc/bsc_init.c index b36797dd3..0c57d41ec 100644 --- a/openbsc/src/libbsc/bsc_init.c +++ b/openbsc/src/libbsc/bsc_init.c @@ -489,12 +489,6 @@ int bsc_network_alloc(mncc_recv_cb_t mncc_recv) bsc_gsmnet->name_long = talloc_strdup(bsc_gsmnet, "OpenBSC"); bsc_gsmnet->name_short = talloc_strdup(bsc_gsmnet, "OpenBSC"); - /* TODO: move to libmsc when gsm_network is split between libbsc and - * libmsc */ - bsc_gsmnet->gsup_server_addr_str = talloc_strdup(bsc_gsmnet, - MSC_HLR_REMOTE_IP_DEFAULT); - bsc_gsmnet->gsup_server_port = MSC_HLR_REMOTE_PORT_DEFAULT; - return 0; } diff --git a/openbsc/src/libbsc/bsc_vty.c b/openbsc/src/libbsc/bsc_vty.c index 0ba3ddd12..b8b851cb2 100644 --- a/openbsc/src/libbsc/bsc_vty.c +++ b/openbsc/src/libbsc/bsc_vty.c @@ -2262,34 +2262,6 @@ DEFUN(cfg_bts_penalty_time_rsvd, cfg_bts_penalty_time_rsvd_cmd, return CMD_SUCCESS; } -DEFUN(cfg_bts_per_loc_upd, cfg_bts_per_loc_upd_cmd, - "periodic location update <6-1530>", - "Periodic Location Updating Interval\n" - "Periodic Location Updating Interval\n" - "Periodic Location Updating Interval\n" - "Periodic Location Updating Interval in Minutes\n") -{ - struct gsm_bts *bts = vty->index; - - bts->si_common.chan_desc.t3212 = atoi(argv[0]) / 6; - - return CMD_SUCCESS; -} - -DEFUN(cfg_bts_no_per_loc_upd, cfg_bts_no_per_loc_upd_cmd, - "no periodic location update", - NO_STR - "Periodic Location Updating Interval\n" - "Periodic Location Updating Interval\n" - "Periodic Location Updating Interval\n") -{ - struct gsm_bts *bts = vty->index; - - bts->si_common.chan_desc.t3212 = 0; - - return CMD_SUCCESS; -} - DEFUN(cfg_bts_radio_link_timeout, cfg_bts_radio_link_timeout_cmd, "radio-link-timeout <4-64>", "Radio link timeout criterion (BTS side)\n" @@ -4004,8 +3976,6 @@ int bsc_vty_init(struct gsm_network *network) install_element(BTS_NODE, &cfg_bts_rach_ec_allowed_cmd); install_element(BTS_NODE, &cfg_bts_rach_ac_class_cmd); install_element(BTS_NODE, &cfg_bts_ms_max_power_cmd); - install_element(BTS_NODE, &cfg_bts_per_loc_upd_cmd); - install_element(BTS_NODE, &cfg_bts_no_per_loc_upd_cmd); install_element(BTS_NODE, &cfg_bts_cell_resel_hyst_cmd); install_element(BTS_NODE, &cfg_bts_rxlev_acc_min_cmd); install_element(BTS_NODE, &cfg_bts_cell_bar_qualify_cmd); diff --git a/openbsc/src/libcommon-cs/common_cs_vty.c b/openbsc/src/libcommon-cs/common_cs_vty.c index f5006822c..379ab60ae 100644 --- a/openbsc/src/libcommon-cs/common_cs_vty.c +++ b/openbsc/src/libcommon-cs/common_cs_vty.c @@ -284,6 +284,34 @@ DEFUN(cfg_net_no_timezone, return CMD_SUCCESS; } +DEFUN(cfg_net_per_loc_upd, cfg_net_per_loc_upd_cmd, + "periodic location update <6-1530>", + "Periodic Location Updating Interval\n" + "Periodic Location Updating Interval\n" + "Periodic Location Updating Interval\n" + "Periodic Location Updating Interval in Minutes\n") +{ + struct gsm_network *net = vty->index; + + net->t3212 = atoi(argv[0]) / 6; + + return CMD_SUCCESS; +} + +DEFUN(cfg_net_no_per_loc_upd, cfg_net_no_per_loc_upd_cmd, + "no periodic location update", + NO_STR + "Periodic Location Updating Interval\n" + "Periodic Location Updating Interval\n" + "Periodic Location Updating Interval\n") +{ + struct gsm_network *net = vty->index; + + net->t3212 = 0; + + return CMD_SUCCESS; +} + static struct gsm_network *vty_global_gsm_network = NULL; /* initialize VTY elements used in both BSC and MSC */ @@ -313,6 +341,8 @@ int common_cs_vty_init(struct gsm_network *network, install_element(GSMNET_NODE, &cfg_net_timezone_cmd); install_element(GSMNET_NODE, &cfg_net_timezone_dst_cmd); install_element(GSMNET_NODE, &cfg_net_no_timezone_cmd); + install_element(GSMNET_NODE, &cfg_net_per_loc_upd_cmd); + install_element(GSMNET_NODE, &cfg_net_no_per_loc_upd_cmd); return CMD_SUCCESS; } diff --git a/openbsc/src/osmo-msc/msc_main.c b/openbsc/src/osmo-msc/msc_main.c index f4b3b363b..b676168a6 100644 --- a/openbsc/src/osmo-msc/msc_main.c +++ b/openbsc/src/osmo-msc/msc_main.c @@ -248,6 +248,10 @@ struct gsm_network *msc_network_alloc(void *ctx, net->name_long = talloc_strdup(net, "OsmoMSC"); net->name_short = talloc_strdup(net, "OsmoMSC"); + net->gsup_server_addr_str = talloc_strdup(net, + MSC_HLR_REMOTE_IP_DEFAULT); + net->gsup_server_port = MSC_HLR_REMOTE_PORT_DEFAULT; + mgcpgw_client_conf_init(&net->mgcpgw.conf); return net; diff --git a/openbsc/tests/ctrl_test_runner.py b/openbsc/tests/ctrl_test_runner.py index 5030e8b1b..058b6f45f 100644 --- a/openbsc/tests/ctrl_test_runner.py +++ b/openbsc/tests/ctrl_test_runner.py @@ -462,109 +462,6 @@ class TestCtrlBSC(TestCtrlBase): self.assertEquals(r['var'], 'mcc') self.assertEquals(r['value'], '202') -class TestCtrlNITB(TestCtrlBase): - - def tearDown(self): - TestCtrlBase.tearDown(self) - os.unlink("test_hlr.sqlite3") - - def ctrl_command(self): - return ["./src/osmo-nitb/osmo-nitb", "-c", - "doc/examples/osmo-nitb/nanobts/openbsc.cfg", "-l", "test_hlr.sqlite3"] - - def ctrl_app(self): - return (4249, "./src/osmo-nitb/osmo-nitb", "OsmoBSC", "nitb") - - def testNumberOfBTS(self): - r = self.do_get('number-of-bts') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'number-of-bts') - self.assertEquals(r['value'], '1') - - def testSubscriberAddWithKi(self): - """Test that we can set the algorithm to none, xor, comp128v1""" - - r = self.do_set('subscriber-modify-v1', '2620345,445566') - self.assertEquals(r['mtype'], 'SET_REPLY') - self.assertEquals(r['var'], 'subscriber-modify-v1') - self.assertEquals(r['value'], 'OK') - - r = self.do_set('subscriber-modify-v1', '2620345,445566,none') - self.assertEquals(r['mtype'], 'SET_REPLY') - self.assertEquals(r['var'], 'subscriber-modify-v1') - self.assertEquals(r['value'], 'OK') - - r = self.do_set('subscriber-modify-v1', '2620345,445566,xor') - self.assertEquals(r['mtype'], 'ERROR') - self.assertEquals(r['error'], 'Value failed verification.') - - r = self.do_set('subscriber-modify-v1', '2620345,445566,comp128v1,00112233445566778899AABBCCDDEEFF') - self.assertEquals(r['mtype'], 'SET_REPLY') - self.assertEquals(r['var'], 'subscriber-modify-v1') - self.assertEquals(r['value'], 'OK') - - r = self.do_set('subscriber-modify-v1', '2620345,445566,none') - self.assertEquals(r['mtype'], 'SET_REPLY') - self.assertEquals(r['var'], 'subscriber-modify-v1') - self.assertEquals(r['value'], 'OK') - - def testSubscriberAddRemove(self): - r = self.do_set('subscriber-modify-v1', '2620345,445566') - self.assertEquals(r['mtype'], 'SET_REPLY') - self.assertEquals(r['var'], 'subscriber-modify-v1') - self.assertEquals(r['value'], 'OK') - - r = self.do_set('subscriber-modify-v1', '2620345,445567') - self.assertEquals(r['mtype'], 'SET_REPLY') - self.assertEquals(r['var'], 'subscriber-modify-v1') - self.assertEquals(r['value'], 'OK') - - # TODO. verify that the entry has been created and modified? Invoke - # the sqlite3 CLI or do it through the DB libraries? - - r = self.do_set('subscriber-delete-v1', '2620345') - self.assertEquals(r['mtype'], 'SET_REPLY') - self.assertEquals(r['value'], 'Removed') - - r = self.do_set('subscriber-delete-v1', '2620345') - self.assertEquals(r['mtype'], 'ERROR') - self.assertEquals(r['error'], 'Failed to find subscriber') - - def testSubscriberList(self): - # TODO. Add command to mark a subscriber as active - r = self.do_get('subscriber-list-active-v1') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'subscriber-list-active-v1') - self.assertEquals(r['value'], None) - - def testApplyConfiguration(self): - r = self.do_get('bts.0.apply-configuration') - self.assertEquals(r['mtype'], 'ERROR') - self.assertEquals(r['error'], 'Write Only attribute') - - r = self.do_set('bts.0.apply-configuration', '1') - self.assertEquals(r['mtype'], 'SET_REPLY') - self.assertEquals(r['value'], 'Tried to drop the BTS') - - def testGprsMode(self): - r = self.do_get('bts.0.gprs-mode') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'bts.0.gprs-mode') - self.assertEquals(r['value'], 'none') - - r = self.do_set('bts.0.gprs-mode', 'bla') - self.assertEquals(r['mtype'], 'ERROR') - self.assertEquals(r['error'], 'Mode is not known') - - r = self.do_set('bts.0.gprs-mode', 'egprs') - self.assertEquals(r['mtype'], 'SET_REPLY') - self.assertEquals(r['value'], 'egprs') - - r = self.do_get('bts.0.gprs-mode') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'bts.0.gprs-mode') - self.assertEquals(r['value'], 'egprs') - class TestCtrlNAT(TestCtrlBase): def ctrl_command(self): @@ -634,10 +531,6 @@ def add_bsc_test(suite, workdir): test = unittest.TestLoader().loadTestsFromTestCase(TestCtrlBSC) suite.addTest(test) -def add_nitb_test(suite, workdir): - test = unittest.TestLoader().loadTestsFromTestCase(TestCtrlNITB) - suite.addTest(test) - def add_nat_test(suite, workdir): if not os.path.isfile(os.path.join(workdir, "src/osmo-bsc_nat/osmo-bsc_nat")): print("Skipping the NAT test") @@ -683,7 +576,6 @@ if __name__ == '__main__': print "Running tests for specific control commands" suite = unittest.TestSuite() add_bsc_test(suite, workdir) - add_nitb_test(suite, workdir) add_nat_test(suite, workdir) add_sgsn_test(suite, workdir) res = unittest.TextTestRunner(verbosity=verbose_level).run(suite) diff --git a/openbsc/tests/smpp_test_runner.py b/openbsc/tests/smpp_test_runner.py index 06fb7665b..af0da8150 100644 --- a/openbsc/tests/smpp_test_runner.py +++ b/openbsc/tests/smpp_test_runner.py @@ -59,14 +59,14 @@ class TestVTYBase(unittest.TestCase): osmoutil.end_proc(self.proc) -class TestSMPPNITB(TestVTYBase): +class TestSMPPMSC(TestVTYBase): def vty_command(self): - return ["./src/osmo-nitb/osmo-nitb", "-c", - "doc/examples/osmo-nitb/nanobts/openbsc.cfg"] + return ["./src/osmo-msc/osmo-msc", "-c", + "doc/examples/osmo-msc/osmo-msc.cfg"] def vty_app(self): - return (4242, "./src/osmo-nitb/osmo-nitb", "OpenBSC", "nitb") + return (4254, "./src/osmo-msc/osmo-msc", "OsmoMSC", "msc") def testSMPPCrashes(self): # Enable the configuration @@ -83,7 +83,7 @@ class TestSMPPNITB(TestVTYBase): self.assertTrue(self.vty.verify('default-route', [''])) self.assertTrue(self.vty.verify('end', [''])) - # NITB should listen to 2775 now! + # MSC should listen to 2775 now! sck = socket.socket(socket.AF_INET, socket.SOCK_STREAM) sck.setblocking(1) sck.connect(('0.0.0.0', 2775)) @@ -131,6 +131,6 @@ if __name__ == '__main__': os.chdir(workdir) print "Running tests for specific SMPP" suite = unittest.TestSuite() - suite.addTest(unittest.TestLoader().loadTestsFromTestCase(TestSMPPNITB)) + suite.addTest(unittest.TestLoader().loadTestsFromTestCase(TestSMPPMSC)) res = unittest.TextTestRunner(verbosity=verbose_level).run(suite) sys.exit(len(res.errors) + len(res.failures)) diff --git a/openbsc/tests/vty_test_runner.py b/openbsc/tests/vty_test_runner.py index d27e915c5..8147cb6ae 100644 --- a/openbsc/tests/vty_test_runner.py +++ b/openbsc/tests/vty_test_runner.py @@ -31,6 +31,14 @@ confpath = '.' class TestVTYBase(unittest.TestCase): + def checkForEndAndExit(self): + res = self.vty.command("list") + #print ('looking for "exit"\n') + self.assert_(res.find(' exit\r') > 0) + #print 'found "exit"\nlooking for "end"\n' + self.assert_(res.find(' end\r') > 0) + #print 'found "end"\n' + def vty_command(self): raise Exception("Needs to be implemented by a subclass") @@ -121,15 +129,7 @@ class TestVTYMGCP(TestVTYBase): class TestVTYGenericBSC(TestVTYBase): - def checkForEndAndExit(self): - res = self.vty.command("list") - #print ('looking for "exit"\n') - self.assert_(res.find(' exit\r') > 0) - #print 'found "exit"\nlooking for "end"\n' - self.assert_(res.find(' end\r') > 0) - #print 'found "end"\n' - - def _testConfigNetworkTree(self): + def _testConfigNetworkTree(self, include_bsc_items=True): self.vty.enable() self.assertTrue(self.vty.verify("configure terminal",[''])) self.assertEquals(self.vty.node(), 'config') @@ -163,17 +163,28 @@ class TestVTYGenericBSC(TestVTYBase): self.assertTrue(self.vty.verify("exit",[''])) self.assertTrue(self.vty.node() is None) -class TestVTYNITB(TestVTYGenericBSC): +class TestVTYMSC(TestVTYBase): def vty_command(self): - return ["./src/osmo-nitb/osmo-nitb", "-c", - "doc/examples/osmo-nitb/nanobts/openbsc.cfg"] + return ["./src/osmo-msc/osmo-msc", "-c", + "doc/examples/osmo-msc/osmo-msc.cfg"] def vty_app(self): - return (4242, "./src/osmo-nitb/osmo-nitb", "OpenBSC", "nitb") + return (4254, "./src/osmo-msc/osmo-msc", "OsmoMSC", "msc") - def testConfigNetworkTree(self): - self._testConfigNetworkTree() + def testConfigNetworkTree(self, include_bsc_items=True): + self.vty.enable() + self.assertTrue(self.vty.verify("configure terminal",[''])) + self.assertEquals(self.vty.node(), 'config') + self.checkForEndAndExit() + self.assertTrue(self.vty.verify("network",[''])) + self.assertEquals(self.vty.node(), 'config-net') + self.checkForEndAndExit() + self.vty.command("write terminal") + self.assertTrue(self.vty.verify("exit",[''])) + self.assertEquals(self.vty.node(), 'config') + self.assertTrue(self.vty.verify("exit",[''])) + self.assertTrue(self.vty.node() is None) def checkForSmpp(self): """SMPP is not always enabled, check if it is""" @@ -245,13 +256,6 @@ class TestVTYNITB(TestVTYGenericBSC): self.assertTrue(self.vty.verify("authorized-regexp 02$", [''])) self.assertTrue(self.vty.verify("authorized-regexp *123.*", [''])) self.vty.command("end") - self.vty.command("configure terminal") - self.vty.command("nitb") - self.assertTrue(self.vty.verify('subscriber-create-on-demand', - ["% 'subscriber-create-on-demand' is no longer supported.", '% This is now up to osmo-hlr.'])) - self.assertTrue(self.vty.verify("subscriber-create-on-demand no-extension", - ["% 'subscriber-create-on-demand' is no longer supported.", '% This is now up to osmo-hlr.'])) - self.vty.command("end") def testSi2Q(self): self.vty.enable() @@ -313,93 +317,6 @@ class TestVTYNITB(TestVTYGenericBSC): self.assertEquals(res.find('periodic location update 60'), -1) self.assert_(res.find('no periodic location update') > 0) - def testEnableDisableSiHacks(self): - self.vty.enable() - self.vty.command("configure terminal") - self.vty.command("network") - self.vty.command("bts 0") - - # Enable periodic lu.. - self.vty.verify("force-combined-si", ['']) - res = self.vty.command("write terminal") - self.assert_(res.find(' force-combined-si') > 0) - self.assertEquals(res.find('no force-combined-si'), -1) - - # Now disable it.. - self.vty.verify("no force-combined-si", ['']) - res = self.vty.command("write terminal") - self.assertEquals(res.find(' force-combined-si'), -1) - self.assert_(res.find('no force-combined-si') > 0) - - def testRachAccessControlClass(self): - self.vty.enable() - self.vty.command("configure terminal") - self.vty.command("network") - self.vty.command("bts 0") - - # Test invalid input - self.vty.verify("rach access-control-class", ['% Command incomplete.']) - self.vty.verify("rach access-control-class 1", ['% Command incomplete.']) - self.vty.verify("rach access-control-class -1", ['% Unknown command.']) - self.vty.verify("rach access-control-class 10", ['% Unknown command.']) - self.vty.verify("rach access-control-class 16", ['% Unknown command.']) - - # Barred rach access control classes - for classNum in range(16): - if classNum != 10: - self.vty.verify("rach access-control-class " + str(classNum) + " barred", ['']) - - # Verify settings - res = self.vty.command("write terminal") - for classNum in range(16): - if classNum != 10: - self.assert_(res.find("rach access-control-class " + str(classNum) + " barred") > 0) - - # Allowed rach access control classes - for classNum in range(16): - if classNum != 10: - self.vty.verify("rach access-control-class " + str(classNum) + " allowed", ['']) - - # Verify settings - res = self.vty.command("write terminal") - for classNum in range(16): - if classNum != 10: - self.assertEquals(res.find("rach access-control-class " + str(classNum) + " barred"), -1) - - def testSubscriberCreateDelete(self): - self.vty.enable() - - imsi = "204300854013739" - imsi2 = "222301824913762" - imsi3 = "333500854113763" - imsi4 = "444583744053764" - - # Initially we don't have this subscriber - self.assertTrue(self.vty.verify('show subscriber imsi '+imsi, ['% No subscriber found for imsi '+imsi])) - - # deprecated - self.assertTrue(self.vty.verify('subscriber create imsi '+imsi, ["% 'subscriber create' now needs to be done at osmo-hlr"])) - - def testSubscriberSettings(self): - self.vty.enable() - - imsi = "204300854013739" - - self.assertTrue(self.vty.verify('subscriber imsi '+imsi+' name foo', ["% 'subscriber name' is no longer supported.", '% This is now up to osmo-hlr.'])) - self.assertTrue(self.vty.verify('subscriber imsi '+imsi+' extension 1234', ["% 'subscriber extension' is no longer supported.", '% This is now up to osmo-hlr.'])) - self.assertTrue(self.vty.verify('subscriber imsi '+imsi+' delete', ["% 'subscriber delete' is no longer supported.", '% This is now up to osmo-hlr.'])) - - # With narrow random interval - self.vty.command("configure terminal") - self.vty.command("nitb") - self.assertTrue(self.vty.verify('subscriber-create-on-demand', ["% 'subscriber-create-on-demand' is no longer supported.", '% This is now up to osmo-hlr.'])) - - def testShowPagingGroup(self): - res = self.vty.command("show paging-group 255 1234567") - self.assertEqual(res, "% can't find BTS 255") - res = self.vty.command("show paging-group 0 1234567") - self.assertEquals(res, "%Paging group for IMSI 1234567 on BTS #0 is 7") - def testShowNetwork(self): res = self.vty.command("show network") self.assert_(res.startswith('BSC is on Country Code') >= 0) @@ -1233,7 +1150,7 @@ if __name__ == '__main__': print "Running tests for specific VTY commands" suite = unittest.TestSuite() suite.addTest(unittest.TestLoader().loadTestsFromTestCase(TestVTYMGCP)) - suite.addTest(unittest.TestLoader().loadTestsFromTestCase(TestVTYNITB)) + suite.addTest(unittest.TestLoader().loadTestsFromTestCase(TestVTYMSC)) add_bsc_test(suite, workdir) add_nat_test(suite, workdir) add_gbproxy_test(suite, workdir) -- cgit v1.2.3