blob: d22703db5c7640477556185de29d665889619cae [file] [log] [blame]
Pau Espin Pedrol2d16f6f2017-05-30 15:33:57 +02001#!/usr/bin/env python3
2
3# This test checks following use-cases while in 'accept-all' policy:
4# * SMPP interface of SMSC accepts SMPP clients (ESMEs) which do not appear on
5# the config file
6
7from osmo_gsm_tester.test import *
8
9nitb = suite.nitb()
10smsc = nitb.smsc
11esme = suite.esme()
12
13# Here we deliberately omit calling smsc.esme_add() to avoid having it included
14# in the smsc config.
15smsc.set_smsc_policy(smsc.SMSC_POLICY_ACCEPT_ALL)
16esme.set_smsc(smsc)
17
18nitb.start()
19
20# Due to accept-all policy, connect() should work even if we didn't previously
21# configure the esme in the smsc, no matter the system_id / password we use.
22log('Test connect with non-empty values in system_id and password')
23esme.set_system_id('foo')
24esme.set_password('bar')
25esme.connect()
26esme.disconnect()
27
28log('Test connect with empty values in system_id and password')
29esme.set_system_id('')
30esme.set_password('')
31esme.connect()
32esme.disconnect()