Merge lp:~jml/canonical-identity-provider/fix-tarmac-tests into lp:canonical-identity-provider/release

Proposed by Jonathan Lange
Status: Merged
Approved by: Jonathan Lange
Approved revision: no longer in the source branch.
Merged at revision: 551
Proposed branch: lp:~jml/canonical-identity-provider/fix-tarmac-tests
Merge into: lp:canonical-identity-provider/release
Diff against target: 15 lines (+7/-0)
1 file modified
tarmac_tests.sh (+7/-0)
To merge this branch: bzr merge lp:~jml/canonical-identity-provider/fix-tarmac-tests
Reviewer Review Type Date Requested Status
Jonathan Lange (community) Approve
Review via email: mp+139473@code.launchpad.net

Commit message

Set up database for tarmac_tests.

Description of the change

We need to set up the database on jenkins. Very difficult to test this locally
so iterating here.

To post a comment you must log in.
Revision history for this message
Jonathan Lange (jml) wrote :

Rubberstamp! Proposer approves of own proposal.

review: Approve
Revision history for this message
ISD Branch Mangler (isd-branches-mangler) wrote :
Download full text (3.3 KiB)

The attempt to merge lp:~jml/canonical-identity-provider/fix-tarmac-tests into lp:canonical-identity-provider failed. Below is the output from the failed tests.

WARNING:root:File /tmp/tmpZw35jM/django_project/../../../local_config/local.cfg could not be read. Skipping.
WARNING:root:File /tmp/tmpZw35jM/django_project/config/config/devel.cfg could not be read. Skipping.
WARNING:root:File /tmp/tmpZw35jM/django_project/../../../local_config/local.cfg could not be read. Skipping.
WARNING:root:File /tmp/tmpZw35jM/django_project/config/config/devel.cfg could not be read. Skipping.
WARNING:root:File /tmp/tmpZw35jM/django_project/../../../local_config/local.cfg could not be read. Skipping.
WARNING:root:File /tmp/tmpZw35jM/django_project/config/config/devel.cfg could not be read. Skipping.
WARNING:root:File /tmp/tmpZw35jM/django_project/../../../local_config/local.cfg could not be read. Skipping.
WARNING:root:File /tmp/tmpZw35jM/django_project/config/config/devel.cfg could not be read. Skipping.
Traceback (most recent call last):
  File "django_project/manage.py", line 11, in <module>
    execute_manager(settings)
  File "/tmp/tmpZw35jM/.env/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 438, in execute_manager
    utility.execute()
  File "/tmp/tmpZw35jM/.env/local/lib/python2.7/site-packages/django_configglue/management/__init__.py", line 71, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/tmp/tmpZw35jM/.env/local/lib/python2.7/site-packages/django/core/management/base.py", line 191, in run_from_argv
    self.execute(*args, **options.__dict__)
  File "/tmp/tmpZw35jM/.env/local/lib/python2.7/site-packages/django/core/management/base.py", line 220, in execute
    output = self.handle(*args, **options)
  File "/tmp/tmpZw35jM/.env/local/lib/python2.7/site-packages/django/core/management/base.py", line 351, in handle
    return self.handle_noargs(**options)
  File "/tmp/tmpZw35jM/.env/local/lib/python2.7/site-packages/django/core/management/commands/syncdb.py", line 56, in handle_noargs
    cursor = connection.cursor()
  File "/tmp/tmpZw35jM/identityprovider/backend/old/base.py", line 25, in cursor
    cursor = super(DatabaseWrapper, self).cursor()
  File "/tmp/tmpZw35jM/.env/local/lib/python2.7/site-packages/debug_toolbar/utils/tracking/__init__.py", line 23, in wrapped
    return callback(func, *args, **kwargs)
  File "/tmp/tmpZw35jM/.env/local/lib/python2.7/site-packages/debug_toolbar/panels/sql.py", line 20, in cursor
    result = func(self)
  File "/tmp/tmpZw35jM/.env/local/lib/python2.7/site-packages/django/db/backends/__init__.py", line 250, in cursor
    cursor = self.make_debug_cursor(self._cursor())
  File "/tmp/tmpZw35jM/identityprovider/backend/base.py", line 179, in _cursor
    cursor = super(DatabaseWrapper, self)._cursor(*args)
  File "/tmp/tmpZw35jM/identityprovider/backend/old/base.py", line 15, in _cursor
    cursor = super(DatabaseWrapper, self)._cursor(*args)
  File "/tmp/tmpZw35jM/.env/local/lib/python2.7/site-packages/django/db/backends/postgresql_psycopg2/base.py", line 140, in _cursor
    self.connection = Database.connect(**conn_params)
psycopg2.OperationalError: FATAL...

Read more...

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'tarmac_tests.sh'
2--- tarmac_tests.sh 2012-12-11 17:57:28 +0000
3+++ tarmac_tests.sh 2012-12-12 14:44:22 +0000
4@@ -7,4 +7,11 @@
5
6 echo "Running canonical-identity-provider tests in tarmac" > $LOG_FILE
7 fab bootstrap >> $LOG_FILE
8+
9+# Set up the database.
10+echo "Changing local.cfg to use the system database" >> $LOG_FILE
11+sed -i 's/db_host = .*/db_host =/g' django_project/local.cfg
12+fab resetdb >> $LOG_FILE
13+
14+# run tests
15 fab test