Tests using SQLite
Damien
damien.nozay at gmail.com
Fri Jun 27 02:58:58 UTC 2014
Hi Gerv,
sorry for a late reply.
If we were talking django instead of perl, I would tell you that there are
subtle differences between
sqlite, oracle, postgres and mysql; one notable issue being foreign key
constraints [1].
>From memory, I have seen in the code some raw SQL and prepared statements;
if you are
confident those are portable between sql vendors, yes sqlite should be a
good option.
Another common pattern I've seen is to just create a database whose name is
prefixed with "test_".
This should take care of not damaging the user's actual database.
thanks,
damien
[1] http://www.sqlite.org/foreignkeys.html
On Tue, Mar 11, 2014 at 4:44 AM, Gervase Markham <gerv at mozilla.org> wrote:
> This idea has been running around my head for a bit...
>
> Now that Bugzilla has SQLite support, can we use it for writing tests
> which require a database? We could make a simple-ish test database as an
> SQLite file, and then it would be possible to run read and even write
> tests without damaging the user's real installation. The DB could be
> reset after each test using source control commands.
>
> This wouldn't have been nearly so easy with e.g. MySQL, but is with SQLite.
>
> Is this a good idea?
>
> Gerv
> _______________________________________________
> dev-apps-bugzilla mailing list
> dev-apps-bugzilla at lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-apps-bugzilla
> -
> To view or change your list settings, click here:
> <http://bugzilla.org/cgi-bin/mj_wwwusr?user=damien.nozay@gmail.com>
>
_______________________________________________
dev-apps-bugzilla mailing list
dev-apps-bugzilla at lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-apps-bugzilla
More information about the developers
mailing list