diff options
Diffstat (limited to 'openbsc/tests')
-rw-r--r-- | openbsc/tests/vty_test_runner.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/openbsc/tests/vty_test_runner.py b/openbsc/tests/vty_test_runner.py index 64437a19c..a3cb9e580 100644 --- a/openbsc/tests/vty_test_runner.py +++ b/openbsc/tests/vty_test_runner.py @@ -756,6 +756,22 @@ class TestVTYSGSN(TestVTYGenericBSC): res = self.vty.command("show running-config") self.assert_(res.find('auth-policy remote') > 0) + def testVtySubscriber(self): + self.vty.enable() + res = self.vty.command('show subscriber cache') + self.assert_(res.find('1234567890') < 0) + self.assertTrue(self.vty.verify('update-subscriber imsi 1234567890 insert authorized 1', [''])) + res = self.vty.command('show subscriber cache') + self.assert_(res.find('1234567890') >= 0) + self.assert_(res.find('Authorized: 1') >= 0) + self.assertTrue(self.vty.verify('update-subscriber imsi 1234567890 insert authorized 0', [''])) + res = self.vty.command('show subscriber cache') + self.assert_(res.find('Authorized: 0') >= 0) + self.assertTrue(self.vty.verify('update-subscriber imsi 1234567890 commit', [''])) + self.assertTrue(self.vty.verify('update-subscriber imsi 1234567890 cancel', [''])) + res = self.vty.command('show subscriber cache') + self.assert_(res.find('1234567890') < 0) + 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") |