[PATCH 1/3] subscr: Add testcase creating an already created subscriber

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/OpenBSC@lists.osmocom.org/.

Neels Hofmeyr nhofmeyr at sysmocom.de
Wed Apr 6 10:24:41 UTC 2016


On Fri, Apr 01, 2016 at 08:33:33PM +0200, Holger Freyther wrote:
> From: Holger Hans Peter Freyther <holger at moiji-mobile.com>
> 
> Add testcase to issue the subscriber create twice.

Could be nice to add this clarification in the test code as comment:

> db_create_subscriber in db.c will first try to find the subscriber and if it
> exists, it will update the "updated" column in the database.

[...]

> +
> +        # Lets create one
> +        res = self.vty.command('subscriber create imsi '+imsi)
> +        self.assert_(res.find("    IMSI: "+imsi) > 0)

... right here.

> +        res2 = self.vty.command('subscriber create imsi '+imsi)
> +        self.assert_(res2.find("    IMSI: "+imsi) > 0)
> +        self.assertEqual(res, res2)

The test isn't testing the update of the 'updated' column, right?  Why though
would the db want to update the 'updated' column for such a noop anyway?

~Neels

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: Digital signature
URL: <http://lists.osmocom.org/pipermail/openbsc/attachments/20160406/1a13914f/attachment.bin>


More information about the OpenBSC mailing list