Closed Bug 1014799 Opened 10 years ago Closed 10 years ago

crontabber fails nosetests during 'make test'

Categories

(Socorro :: General, task)

task
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: vfazio, Assigned: peterbe)

Details

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:32.0) Gecko/20100101 Firefox/32.0 (Beta/Release)
Build ID: 20140522030204

Steps to reproduce:

run 'make test' after checking out soccoro and following the installation guide (http://socorro.readthedocs.org/en/latest/installation.html).

OR

nosetests socorro/unittest/cron/



Actual results:

crontabber fails with authentication errors due to an invalid DSN in socorro-virtualenv/lib/python2.6/site-packages/crontabber/tests/base.py




Expected results:

There should be no auth errors. For 'make test', the cl parameters should be used or otherwise it should default to a config in ./config/
That is my fault. I should fix it.
Assignee: nobody → peterbe
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
(In reply to Peter Bengtsson [:peterbe] from comment #1)
> That is my fault. I should fix it.

Hey peterbe,

Any progress on this? Why does it work on jenkins and not locally?
(In reply to vfazio from comment #0)
> crontabber fails with authentication errors due to an invalid DSN in
> socorro-virtualenv/lib/python2.6/site-packages/crontabber/tests/base.py

Just to make sure we're on the same page, this manifests as messages like this in the output correct?

OperationalError: FATAL:  role "password=" does not exist
Here's a workaround (which is why it's not failing on jenkins because it overrides a bunch of things like this on the command line):

make test database_username=test
Commits pushed to master at https://github.com/mozilla/socorro

https://github.com/mozilla/socorro/commit/56f8c2433332cfedab6af5cd868b61c06c54a3e1
bug 1014799 - work around crontabber unit test fail

https://github.com/mozilla/socorro/commit/fad9bdc9a16d14afde897045cb5e9577564551a0
Merge pull request #2088 from rhelmer/bug1014799-workaround-crontabber-test-fail

bug 1014799 - work around crontabber unit test fail
(In reply to Robert Helmer [:rhelmer] from comment #4)
> Here's a workaround (which is why it's not failing on jenkins because it
> overrides a bunch of things like this on the command line):
> 
> make test database_username=test

Actually need to have this, if you're using the pg_hba.conf settings we suggest in install docs (I was cheating and had "trust" enabled):

make test database_username=test database_password=aPassword
I'm getting this error now, even with a 'test_crontabber.ini' file in the root directory: 

======================================================================
ERROR: test_run_weekly_reports_partitions (socorro.unittest.cron.jobs.test_weekly_reports_partitions.TestWeeklyReportsPartitions)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/selena/proj/repos/socorro/socorro-virtualenv/lib/python2.6/site-packages/crontabber/tests/base.py", line 142, in setUp
    self.conn = psycopg2.connect(dsn)
  File "/Users/selena/proj/repos/socorro/socorro-virtualenv/lib/python2.6/site-packages/psycopg2/__init__.py", line 179, in connect
    connection_factory=connection_factory, async=async)
OperationalError: FATAL:  database "user=" does not exist
Target Milestone: --- → 88
This was actually fixed some time ago by lars. It's using resources in configman now.
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.