[Compat Data] Tests fail when using postgres database

RESOLVED FIXED

Status

Mozilla Developer Network
General
--
minor
RESOLVED FIXED
3 years ago
3 years ago

People

(Reporter: jwhitlock, Unassigned)

Tracking

Details

(Whiteboard: [specification][type:bug])

(Reporter)

Description

3 years ago
What did you do?
================
1. Created a postgres user and database
2. export DATABASE_URL=postgres://user:password@localhost:5432/dbname
3. Run tests

What happened?
==============
Out of 196 tests, 2 errored and 14 failed.

What should have happened?
==========================
All tests should pass

Is there anything else we should know?
======================================
The differences appear to be in instance primary keys.  SQLite will re-use auto IDs during a test run, but postgresql assigns incrementing auto IDs, even when wrapped inside a transaction.
(Reporter)

Updated

3 years ago
Blocks: 996570
Severity: normal → minor
:travis - this system will likely run on the cloud infrastructure in 2015. What is the best RDBS to use during development to match deployment?
Flags: needinfo?(tblow)
(Reporter)

Comment 2

3 years ago
We're currently running on Heroku, using PostgreSQL on their hobby-basic plan:

https://devcenter.heroku.com/articles/heroku-postgres-plans#hobby-tier

For a previous project, I used AWS's RDS for PostgreSQL, which took care of backups, software updates, etc.:

http://aws.amazon.com/rds/postgresql/

AWS also supports MySQL, but that's gross.

PR #12 fixes the tests, and tests against PostgreSQL in Travis:

https://github.com/mozilla/web-platform-compat/pull/12
We're fine with either MySQL or Postgres.  I'd actually recommend MySQL only because of Aurora recently announced by AWS.  It's fully MySQL compatible with significant performance improvements.
Flags: needinfo?(tblow)

Updated

3 years ago
Status: UNCONFIRMED → RESOLVED
Last Resolved: 3 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.