diff options
author | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2015-02-06 16:23:29 +0100 |
---|---|---|
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | 2015-02-06 16:44:58 +0100 |
commit | 9c20a5f45c49562ab7e3e53b5abb94e2afdfb23f (patch) | |
tree | 82e30699c33d21eaebcfa104db58f573e786b32b /openbsc/tests/vty_test_runner.py | |
parent | ca69b0f68d748e56eecd14d1c1a754971e9240ba (diff) |
sgsn: Add easy APN commands with just the name
For most configurations we don't address multiple GGSNs but
only want to enforce a list of APNs. In the future we might
add a special global GGSN context but not right now.
Fixes: SYS#593
Diffstat (limited to 'openbsc/tests/vty_test_runner.py')
-rw-r--r-- | openbsc/tests/vty_test_runner.py | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/openbsc/tests/vty_test_runner.py b/openbsc/tests/vty_test_runner.py index cae1c1414..9a531cf87 100644 --- a/openbsc/tests/vty_test_runner.py +++ b/openbsc/tests/vty_test_runner.py @@ -815,6 +815,24 @@ class TestVTYSGSN(TestVTYGenericBSC): self.assert_(res.find('apn apn1.test imsi-prefix 123456 ggsn 0') >= 0) self.assert_(res.find('apn apn2.test imsi-prefix 123456 ggsn 0') >= 0) + def testVtyEasyAPN(self): + self.vty.enable() + self.assertTrue(self.vty.verify('configure terminal', [''])) + self.assertEquals(self.vty.node(), 'config') + self.assertTrue(self.vty.verify('sgsn', [''])) + self.assertEquals(self.vty.node(), 'config-sgsn') + + res = self.vty.command("show running-config") + self.assertEquals(res.find("apn internet"), -1) + + self.assertTrue(self.vty.verify("access-point-name internet.apn", [''])) + res = self.vty.command("show running-config") + self.assert_(res.find("apn internet.apn ggsn 0") >= 0) + + self.assertTrue(self.vty.verify("no access-point-name internet.apn", [''])) + res = self.vty.command("show running-config") + self.assertEquals(res.find("apn internet"), -1) + 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") |