From aefcb75d56b19182782d1e090009b4b2b2e4b627 Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Sun, 10 Jun 2018 22:13:09 +0200 Subject: remove traces of osmo-bsc_nat in python test (osmoappdesc/test_runner) Change-Id: I9127ddb7b29eb82defd3a8afac9c1dbfd424fb72 --- osmoappdesc.py | 6 ++-- tests/ctrl_test_runner.py | 78 ----------------------------------------------- 2 files changed, 2 insertions(+), 82 deletions(-) diff --git a/osmoappdesc.py b/osmoappdesc.py index 338239c44..f5f18b235 100644 --- a/osmoappdesc.py +++ b/osmoappdesc.py @@ -16,12 +16,10 @@ app_configs = { "osmo-bsc": ["doc/examples/osmo-bsc/osmo-bsc.cfg", - "doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg"], - "nat": ["doc/examples/osmo-bsc_nat/osmo-bsc_nat.cfg"], + "doc/examples/osmo-bsc/osmo-bsc_custom-sccp.cfg"] } -apps = [(4242, "src/osmo-bsc/osmo-bsc", "OsmoBSC", "osmo-bsc"), - (4244, "src/osmo-bsc_nat/osmo-bsc_nat", "OsmoBSCNAT", "nat"), +apps = [(4242, "src/osmo-bsc/osmo-bsc", "OsmoBSC", "osmo-bsc") ] vty_command = ["./src/osmo-bsc/osmo-bsc", "-c", diff --git a/tests/ctrl_test_runner.py b/tests/ctrl_test_runner.py index f43c09a79..cc37c9702 100755 --- a/tests/ctrl_test_runner.py +++ b/tests/ctrl_test_runner.py @@ -489,68 +489,6 @@ class TestCtrlBSC(TestCtrlBase): self.assertEquals(r['var'], 'mcc') self.assertEquals(r['value'], '002') -class TestCtrlNAT(TestCtrlBase): - - def ctrl_command(self): - return ["./src/osmo-bsc_nat/osmo-bsc_nat", "-c", - "doc/examples/osmo-bsc_nat/osmo-bsc_nat.cfg"] - - def ctrl_app(self): - return (4250, "./src/osmo-bsc_nat/osmo-bsc_nat", "OsmoNAT", "nat") - - def testAccessList(self): - r = self.do_get('net.0.bsc_cfg.0.access-list-name') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'net') - self.assertEquals(r['value'], None) - - r = self.do_set('net.0.bsc_cfg.0.access-list-name', 'bla') - self.assertEquals(r['mtype'], 'SET_REPLY') - self.assertEquals(r['var'], 'net') - self.assertEquals(r['value'], 'bla') - - r = self.do_get('net.0.bsc_cfg.0.access-list-name') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'net') - self.assertEquals(r['value'], 'bla') - - r = self.do_set('net.0.bsc_cfg.0.no-access-list-name', '1') - self.assertEquals(r['mtype'], 'SET_REPLY') - self.assertEquals(r['var'], 'net') - self.assertEquals(r['value'], None) - - r = self.do_get('net.0.bsc_cfg.0.access-list-name') - self.assertEquals(r['mtype'], 'GET_REPLY') - self.assertEquals(r['var'], 'net') - self.assertEquals(r['value'], None) - - def testAccessListManagement(self): - r = self.do_set("net.0.add.allow.access-list.404", "abc") - self.assertEquals(r['mtype'], 'ERROR') - - r = self.do_set("net.0.add.allow.access-list.bla", "^234$") - self.assertEquals(r['mtype'], 'SET_REPLY') - self.assertEquals(r['var'], 'net.0.add.allow.access-list.bla') - self.assertEquals(r['value'], 'IMSI allow added to access list') - - # TODO.. find a way to actually see if this rule has been - # added. e.g. by implementing a get for the list. - -class TestCtrlSGSN(TestCtrlBase): - def ctrl_command(self): - return ["./src/gprs/osmo-sgsn", "-c", - "doc/examples/osmo-sgsn/osmo-sgsn.cfg"] - - def ctrl_app(self): - return (4251, "./src/gprs/osmo-sgsn", "OsmoSGSN", "sgsn") - - def testListSubscribers(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 add_bsc_test(suite, workdir): if not os.path.isfile(os.path.join(workdir, "src/osmo-bsc/osmo-bsc")): print("Skipping the BSC test") @@ -558,20 +496,6 @@ def add_bsc_test(suite, workdir): test = unittest.TestLoader().loadTestsFromTestCase(TestCtrlBSC) 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") - return - test = unittest.TestLoader().loadTestsFromTestCase(TestCtrlNAT) - suite.addTest(test) - -def add_sgsn_test(suite, workdir): - if not os.path.isfile(os.path.join(workdir, "src/gprs/osmo-sgsn")): - print("Skipping the SGSN test") - return - test = unittest.TestLoader().loadTestsFromTestCase(TestCtrlSGSN) - suite.addTest(test) - if __name__ == '__main__': import argparse import sys @@ -603,7 +527,5 @@ if __name__ == '__main__': print "Running tests for specific control commands" suite = unittest.TestSuite() add_bsc_test(suite, workdir) - add_nat_test(suite, workdir) - add_sgsn_test(suite, workdir) res = unittest.TextTestRunner(verbosity=verbose_level).run(suite) sys.exit(len(res.errors) + len(res.failures)) -- cgit v1.2.3