test_subscriber.ctrl: test against octal/hex interpretation of id

Add a large enough subscriber id and add a test that ensures a leading zero is
not interpreted as octal, and that a leading 0x is invalid and not interpreted
as hexadecimal.

Change-Id: Ib468b7cb595cf52331ebb41e6de0e8f57f69e173
This commit is contained in:
Neels Hofmeyr 2017-10-17 22:26:00 +02:00
parent 446eb0f1bc
commit 3f697cdc71
2 changed files with 20 additions and 0 deletions

View File

@ -596,3 +596,19 @@ ms_purged_ps 0
periodic_lu_timer 0
periodic_rau_tau_timer 0
lmsi 00000000
GET 100 subscriber.by-id-00123.info
GET_REPLY 100 subscriber.by-id-00123.info
id 123
imsi 123123
msisdn 123
nam_cs 1
nam_ps 1
ms_purged_cs 0
ms_purged_ps 0
periodic_lu_timer 0
periodic_rau_tau_timer 0
lmsi 00000000
GET 101 subscriber.by-id-0x0123.info
ERROR 101 Invalid value part of 'by-xxx-value' selector.

View File

@ -11,3 +11,7 @@ INSERT INTO auc_3g (subscriber_id, algo_id_3g, k, opc, sqn) VALUES (2, 5, '00010
INSERT INTO subscriber (id, imsi, msisdn) VALUES (3, '901990000000003', '103');
INSERT INTO auc_2g (subscriber_id, algo_id_2g, ki) VALUES (3, 1, '000102030405060708090a0b0c0d0e0f');
INSERT INTO auc_3g (subscriber_id, algo_id_3g, k, opc, sqn) VALUES (3, 5, '000102030405060708090a0b0c0d0e0f', '101112131415161718191a1b1c1d1e1f', 2342);
-- A subscriber id > 7 and > 15 to check against octal and hex notations
INSERT INTO subscriber (id, imsi, msisdn) VALUES (123, '123123', '123');
INSERT INTO auc_2g (subscriber_id, algo_id_2g, ki) VALUES (123, 3, 'BeefedCafeFaceAcedAddedDecadeFee');