bslatkin / dpxdt

Make continuous deployment safe by comparing before and after webpage screenshots for each release. Depicted shows when any visual, perceptual differences are found. This is the ultimate, automated end-to-end test.
https://dpxdt-test.appspot.com
Apache License 2.0
1.44k stars 124 forks source link

Support PostgreSQL as a backend #199

Closed gentoo90 closed 8 years ago

gentoo90 commented 8 years ago

PostgreSQL needs enums to have names and can't set a boolean field to 1

bslatkin commented 8 years ago

Thanks for putting this together!

Do you know if existing DBs (mysql and sqlite) will need to migrate if they redeploy with this code?

Also: Do you have a link to how the named enums work?

gentoo90 commented 8 years ago

I tried to run unit tests againtst postgresql and mysql and site_diff_test fails with timeout:

======================================================================
FAIL: testCrawler (__main__.SiteDiffTest)
Tests that the crawler behaves well.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "./tests/site_diff_test.py", line 238, in testCrawler
    release = wait_for_release(self.build_id, self.release_name)
  File "./tests/site_diff_test.py", line 78, in wait_for_release
    'Timing out waiting for release to enter terminal state')
AssertionError: Timing out waiting for release to enter terminal state

======================================================================
FAIL: testEndToEnd (__main__.SiteDiffTest)
Tests doing a site diff from end to end.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "./tests/site_diff_test.py", line 137, in testEndToEnd
    release = wait_for_release(self.build_id, self.release_name)
  File "./tests/site_diff_test.py", line 78, in wait_for_release
    'Timing out waiting for release to enter terminal state')
AssertionError: Timing out waiting for release to enter terminal state

----------------------------------------------------------------------

It looks like site_diff_test.py:71 doesn't actually refresh release status. https://stackoverflow.com/questions/18830540/sqlalchemy-session-refresh-does-not-refresh-object I caught this on master too, so it's not from my pull request.

Regarding enums I only found documentation of SQLAlchemy. I compared dumps of master and my pull request from MariaDB and sqlite. MariaDB are identical and here is sqlite diff

bslatkin commented 8 years ago

Okay thanks for more info! I'll file an issue for that other thing.