summaryrefslogtreecommitdiffstats
path: root/openbsc/tests
diff options
context:
space:
mode:
authorNeels Hofmeyr <nhofmeyr@sysmocom.de>2016-05-10 13:29:33 +0200
committerHarald Welte <laforge@gnumonks.org>2016-12-02 12:09:17 +0000
commit7398395cc01977aa9b41c2d433b487154b60ce2a (patch)
tree42f69c72e3d0968a5027c3bd62bdc384b0447be2 /openbsc/tests
parent1a60644eb21a5c50eddc5790444022fd5aa11df8 (diff)
Move timezone settings up to network level
Time zone used to be configurable per-BTS. In the upcoming MSC-split, no BTS structures will be available on the MSC level. To simplify, drop the ability to manage several time zones in a core network and place the time zone config on the network VTY level, i.e. in gsm_network. If we are going to re-add fine grained time zone settings, it should probably be tied to the LAC. Adjust time zone VTY config code (to be moved to libcommon-cs in subsequent commit). Adjust time zone Ctrl Interface code. Change-Id: I69848887d92990f3d6f969be80f6ef91f6bdbbe8
Diffstat (limited to 'openbsc/tests')
-rw-r--r--openbsc/tests/bsc/bsc_test.c8
-rw-r--r--openbsc/tests/ctrl_test_runner.py30
-rw-r--r--openbsc/tests/vty_test_runner.py1
3 files changed, 19 insertions, 20 deletions
diff --git a/openbsc/tests/bsc/bsc_test.c b/openbsc/tests/bsc/bsc_test.c
index 6d41941c1..7174828c3 100644
--- a/openbsc/tests/bsc/bsc_test.c
+++ b/openbsc/tests/bsc/bsc_test.c
@@ -147,10 +147,10 @@ static void test_scan(void)
struct msgb *msg = msgb_alloc(4096, "test-message");
int is_set = 0;
- bts->tz.hr = get_int(test_def->params, test_def->n_params, "tz_hr", 0, &is_set);
- bts->tz.mn = get_int(test_def->params, test_def->n_params, "tz_mn", 0, &is_set);
- bts->tz.dst = get_int(test_def->params, test_def->n_params, "tz_dst", 0, &is_set);
- bts->tz.override = 1;
+ net->tz.hr = get_int(test_def->params, test_def->n_params, "tz_hr", 0, &is_set);
+ net->tz.mn = get_int(test_def->params, test_def->n_params, "tz_mn", 0, &is_set);
+ net->tz.dst = get_int(test_def->params, test_def->n_params, "tz_dst", 0, &is_set);
+ net->tz.override = 1;
printf("Going to test item: %d\n", i);
msg->l3h = msgb_put(msg, test_def->length);
diff --git a/openbsc/tests/ctrl_test_runner.py b/openbsc/tests/ctrl_test_runner.py
index bed685ada..4fd831fd3 100644
--- a/openbsc/tests/ctrl_test_runner.py
+++ b/openbsc/tests/ctrl_test_runner.py
@@ -331,41 +331,41 @@ class TestCtrlBSC(TestCtrlBase):
self.assertEquals(r['value'], 'state=off,policy=on')
def testTimezone(self):
- r = self.do_get('bts.0.timezone')
+ r = self.do_get('timezone')
self.assertEquals(r['mtype'], 'GET_REPLY')
- self.assertEquals(r['var'], 'bts.0.timezone')
+ self.assertEquals(r['var'], 'timezone')
self.assertEquals(r['value'], 'off')
- r = self.do_set('bts.0.timezone', '-2,15,2')
+ r = self.do_set('timezone', '-2,15,2')
self.assertEquals(r['mtype'], 'SET_REPLY')
- self.assertEquals(r['var'], 'bts.0.timezone')
+ self.assertEquals(r['var'], 'timezone')
self.assertEquals(r['value'], '-2,15,2')
- r = self.do_get('bts.0.timezone')
+ r = self.do_get('timezone')
self.assertEquals(r['mtype'], 'GET_REPLY')
- self.assertEquals(r['var'], 'bts.0.timezone')
+ self.assertEquals(r['var'], 'timezone')
self.assertEquals(r['value'], '-2,15,2')
# Test invalid input
- r = self.do_set('bts.0.timezone', '-2,15,2,5,6,7')
+ r = self.do_set('timezone', '-2,15,2,5,6,7')
self.assertEquals(r['mtype'], 'SET_REPLY')
- self.assertEquals(r['var'], 'bts.0.timezone')
+ self.assertEquals(r['var'], 'timezone')
self.assertEquals(r['value'], '-2,15,2')
- r = self.do_set('bts.0.timezone', '-2,15')
+ r = self.do_set('timezone', '-2,15')
self.assertEquals(r['mtype'], 'ERROR')
- r = self.do_set('bts.0.timezone', '-2')
+ r = self.do_set('timezone', '-2')
self.assertEquals(r['mtype'], 'ERROR')
- r = self.do_set('bts.0.timezone', '1')
+ r = self.do_set('timezone', '1')
- r = self.do_set('bts.0.timezone', 'off')
+ r = self.do_set('timezone', 'off')
self.assertEquals(r['mtype'], 'SET_REPLY')
- self.assertEquals(r['var'], 'bts.0.timezone')
+ self.assertEquals(r['var'], 'timezone')
self.assertEquals(r['value'], 'off')
- r = self.do_get('bts.0.timezone')
+ r = self.do_get('timezone')
self.assertEquals(r['mtype'], 'GET_REPLY')
- self.assertEquals(r['var'], 'bts.0.timezone')
+ self.assertEquals(r['var'], 'timezone')
self.assertEquals(r['value'], 'off')
def testMcc(self):
diff --git a/openbsc/tests/vty_test_runner.py b/openbsc/tests/vty_test_runner.py
index a73dadd20..cf2cf180f 100644
--- a/openbsc/tests/vty_test_runner.py
+++ b/openbsc/tests/vty_test_runner.py
@@ -651,7 +651,6 @@ class TestVTYBSC(TestVTYGenericBSC):
self.vty.enable()
self.vty.verify("configure terminal", [''])
self.vty.verify("network", [''])
- self.vty.verify("bts 0", [''])
# Test invalid input
self.vty.verify("timezone", ['% Command incomplete.'])