blob: 85abb9bcb8e347e2a7ac2346f6dc6839b2b85b58 [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
Pau Espin Pedroldfe38ad2017-11-09 13:57:39 +01007from osmo_gsm_tester.testenv import *
Pau Espin Pedrol2d16f6f2017-05-30 15:33:57 +02008
Pau Espin Pedrol40c7bc72020-05-05 13:41:42 +02009nitb = tenv.nitb()
Pau Espin Pedrol43857802018-09-13 15:07:27 +020010smsc = nitb.smsc
Pau Espin Pedrol40c7bc72020-05-05 13:41:42 +020011esme = tenv.esme()
Pau Espin Pedrol2d16f6f2017-05-30 15:33:57 +020012
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
Pau Espin Pedrol43857802018-09-13 15:07:27 +020018nitb.start()
Pau Espin Pedrol2d16f6f2017-05-30 15:33:57 +020019
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()