diff options
author | Ivan Kluchnikov <kluchnikovi@gmail.com> | 2013-09-13 19:46:26 +0400 |
---|---|---|
committer | Ivan Kluchnikov <kluchnikovi@gmail.com> | 2013-09-13 19:46:26 +0400 |
commit | 1bca2750fb21067995db46939e75950cdf12bbe0 (patch) | |
tree | 2cba2a22898f949d2a6c08f79a0283bc8850d5c2 /openbsc | |
parent | 382fbc5f1de5b56658c1f0912bdb1f6938235991 (diff) |
Added test for "rach access-control-class" VTY command.kluchnikov/wip
Diffstat (limited to 'openbsc')
-rwxr-xr-x | openbsc/tests/vty_test_runner.py | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/openbsc/tests/vty_test_runner.py b/openbsc/tests/vty_test_runner.py index 35941290f..1e25a9185 100755 --- a/openbsc/tests/vty_test_runner.py +++ b/openbsc/tests/vty_test_runner.py @@ -205,6 +205,41 @@ class TestVTYNITB(TestVTYGenericBSC): res = self.vty.command("write terminal") self.assert_(res.find('auth policy black-list') > 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) + class TestVTYBSC(TestVTYGenericBSC): def vty_command(self): |