<div dir="ltr"><div class="gmail_default" style="font-family:georgia,serif;font-size:small">Great, thanks!</div><div class="gmail_default" style="font-family:georgia,serif;font-size:small"><br></div><div class="gmail_default" style="font-family:georgia,serif;font-size:small">Eden</div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-04-15 17:30 GMT+02:00 Nemesis <span dir="ltr"><<a href="mailto:nemesis@ninux.org" target="_blank">nemesis@ninux.org</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
<div>I see.<br>
<br>
Do you know this?
<a href="https://github.com/ninuxorg/nodeshot/tree/master/tests" target="_blank">https://github.com/ninuxorg/nodeshot/tree/master/tests</a><br>
It's the test app that is used for automated testing on
<a href="http://travic-ci.org" target="_blank">travic-ci.org</a> and on my jenkins instance.<br>
<br>
I suggest you to do the following:<br>
<ol>
<li>setup a local_settings.py in tests/ci/ with your test
database settings, copy it from this one:
<a href="https://github.com/ninuxorg/nodeshot/blob/master/tests/ci/local_settings.example.py" target="_blank">https://github.com/ninuxorg/nodeshot/blob/master/tests/ci/local_settings.example.py</a></li>
<li>try running ./manage.py syncdb in tests/ to ensure
everything works out</li>
<li>then run ./runtests.py, this one:
<a href="https://github.com/ninuxorg/nodeshot/blob/master/tests/runtests.py" target="_blank">https://github.com/ninuxorg/nodeshot/blob/master/tests/runtests.py</a></li>
</ol>
Fed<div><div class="h5"><br>
<br>
<br>
On 04/15/2015 05:24 PM, Eden Ray Gardner wrote:<br>
</div></div></div><div><div class="h5">
<blockquote type="cite">
<div dir="ltr">
<div class="gmail_default" style="font-family:georgia,serif;font-size:small">Hi Federico,</div>
<div class="gmail_default" style="font-family:georgia,serif;font-size:small"><br>
</div>
<div class="gmail_default" style="font-family:georgia,serif;font-size:small">I am in
Pycharm and rightclick at the highest nodeshot folder..., so
that probably runs 'everything' as you mentioned. I have to
check how to run django test properly in pycharm then...</div>
<div class="gmail_default" style="font-family:georgia,serif;font-size:small"><br>
</div>
<div class="gmail_default" style="font-family:georgia,serif;font-size:small">Thanks,</div>
<div class="gmail_default" style="font-family:georgia,serif;font-size:small"><br>
</div>
<div class="gmail_default" style="font-family:georgia,serif;font-size:small">Eden</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">2015-04-15 17:21 GMT+02:00 Nemesis <span dir="ltr"><<a href="mailto:nemesis@ninux.org" target="_blank">nemesis@ninux.org</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
<div>Hey Eden,<br>
<br>
what command are you using to run the tests?<br>
<br>
The error you're getting is from the new
nodeshot.core.metrics django app, which is still
disabled by default, so you should not get this error
unless you enabled it or unless you're using a command
that runs all the unit tests, even for the modules which
are disabled.<br>
<br>
The tests should be run by doing something like:<br>
<br>
cd tests/<br>
./runtests.py<br>
<br>
(assuming the database in the test settings are
configured correctly)<br>
<br>
Federico
<div>
<div><br>
<br>
<br>
On 04/15/2015 04:03 PM, Eden Ray Gardner wrote:<br>
</div>
</div>
</div>
<blockquote type="cite">
<div>
<div>
<div dir="ltr">
<div class="gmail_default" style="font-family:georgia,serif;font-size:small">
<div class="gmail_default">Hello,</div>
<div class="gmail_default"><br>
</div>
<div class="gmail_default">I used current build
of nodeshot and had it tested on shippable and
all 250 tests passed. However when I run the
tests on my local machine I keep getting three
failing tests. Any help?:</div>
<div class="gmail_default"><br>
</div>
<div class="gmail_default">This is output of my
tests:</div>
<div class="gmail_default"><br>
</div>
<div class="gmail_default" style="font-family:arial,sans-serif;font-size:12.8000001907349px">
<div class="gmail_default"><span style="font-family:georgia,serif">Testing
started at 15:45 ...</span><br>
</div>
<div class="gmail_default"><font face="georgia, serif">Creating test
database for alias 'default'...</font></div>
<div class="gmail_default"><font face="georgia, serif">Type 'yes' if you
would like to try deleting the test
database 'test_nodeshot', or 'no' to
cancel: Got an error creating the test
database: database "test_nodeshot" already
exists</font></div>
<div class="gmail_default"><font face="georgia, serif"><br>
</font></div>
<div class="gmail_default"><font face="georgia, serif">Destroying old test
database 'default'...</font></div>
<div class="gmail_default"><font face="georgia, serif"><br>
</font></div>
<div class="gmail_default"><font face="georgia, serif"><br>
</font></div>
<div class="gmail_default"><font face="georgia, serif">[INFO 2015-04-15
15:45:38,126] module: base, process:
25464, thread: 140337668454208</font></div>
<div class="gmail_default"><font face="georgia, serif">Raven is not
configured (logging is disabled). Please
see the documentation for more
information.</font></div>
<div class="gmail_default"><font face="georgia, serif"><br>
</font></div>
<div class="gmail_default"><font face="georgia, serif"><br>
</font></div>
<div class="gmail_default"><font face="georgia, serif">Error</font></div>
<div class="gmail_default"><font face="georgia, serif">Traceback (most
recent call last):</font></div>
<div class="gmail_default"><font face="georgia, serif"> File
"/usr/local/lib/virtualenvs/nodeshot/src/nodeshot/nodeshot/interop/oldimporter/tests.py",
line 35, in setUp</font></div>
<div class="gmail_default"><font face="georgia, serif">
management.call_command('loaddata',
fixture, database='old_nodeshot')</font></div>
<div class="gmail_default"><font face="georgia, serif"> File
"/usr/local/lib/virtualenvs/nodeshot/local/lib/python2.7/site-packages/django/core/management/__init__.py",
line 159, in call_command</font></div>
<div class="gmail_default"><font face="georgia, serif"> return
klass.execute(*args, **defaults)</font></div>
<div class="gmail_default"><font face="georgia, serif"> File
"/usr/local/lib/virtualenvs/nodeshot/local/lib/python2.7/site-packages/django/core/management/base.py",
line 285, in execute</font></div>
<div class="gmail_default"><font face="georgia, serif"> output =
self.handle(*args, **options)</font></div>
<div class="gmail_default"><font face="georgia, serif"> File
"/usr/local/lib/virtualenvs/nodeshot/local/lib/python2.7/site-packages/django/core/management/commands/loaddata.py",
line 54, in handle</font></div>
<div class="gmail_default"><font face="georgia, serif"> with
transaction.commit_on_success_unless_managed(using=self.using):</font></div>
<div class="gmail_default"><font face="georgia, serif"> File
"/usr/local/lib/virtualenvs/nodeshot/local/lib/python2.7/site-packages/django/db/transaction.py",
line 531, in
commit_on_success_unless_managed</font></div>
<div class="gmail_default"><font face="georgia, serif"> connection =
get_connection(using)</font></div>
<div class="gmail_default"><font face="georgia, serif"> File
"/usr/local/lib/virtualenvs/nodeshot/local/lib/python2.7/site-packages/django/db/transaction.py",
line 42, in get_connection</font></div>
<div class="gmail_default"><font face="georgia, serif"> return
connections[using]</font></div>
<div class="gmail_default"><font face="georgia, serif"> File
"/usr/local/lib/virtualenvs/nodeshot/local/lib/python2.7/site-packages/django/db/utils.py",
line 196, in __getitem__</font></div>
<div class="gmail_default"><font face="georgia, serif">
self.ensure_defaults(alias)</font></div>
<div class="gmail_default"><font face="georgia, serif"> File
"/usr/local/lib/virtualenvs/nodeshot/local/lib/python2.7/site-packages/django/db/utils.py",
line 172, in ensure_defaults</font></div>
<div class="gmail_default"><font face="georgia, serif"> raise
ConnectionDoesNotExist("The connection %s
doesn't exist" % alias)</font></div>
<div class="gmail_default"><font face="georgia, serif">ConnectionDoesNotExist:
The connection old_nodeshot doesn't exist</font></div>
<div class="gmail_default"><font face="georgia, serif"><br>
</font></div>
<div class="gmail_default"><font face="georgia, serif"><br>
</font></div>
<div class="gmail_default"><font face="georgia, serif">Error</font></div>
<div class="gmail_default"><font face="georgia, serif">Traceback (most
recent call last):</font></div>
<div class="gmail_default"><font face="georgia, serif"> File
"/usr/local/lib/virtualenvs/nodeshot/src/nodeshot/nodeshot/interop/sync/tests.py",
line 603, in test_nodeshot_sync</font></div>
<div class="gmail_default"><font face="georgia, serif">
self.assertEqual(type(response.data['results']),
list)</font></div>
<div class="gmail_default"><font face="georgia, serif">KeyError: 'results'</font></div>
<div class="gmail_default"><font face="georgia, serif"><br>
</font></div>
<div class="gmail_default"><font face="georgia, serif">there are no old
notifications to purge</font></div>
<div class="gmail_default"><font face="georgia, serif"><br>
</font></div>
<div class="gmail_default"><font face="georgia, serif">found 1
notifications to purge...</font></div>
<div class="gmail_default"><font face="georgia, serif"><br>
</font></div>
<div class="gmail_default"><font face="georgia, serif">1 notifications
deleted successfully.</font></div>
<div class="gmail_default"><font face="georgia, serif"><br>
</font></div>
<div class="gmail_default"><font face="georgia, serif">found 1
notifications to purge...</font></div>
<div class="gmail_default"><font face="georgia, serif"><br>
</font></div>
<div class="gmail_default"><font face="georgia, serif">1 notifications
deleted successfully.</font></div>
<div class="gmail_default"><font face="georgia, serif"><br>
</font></div>
<div class="gmail_default"><font face="georgia, serif"><br>
</font></div>
<div class="gmail_default"><font face="georgia, serif">Error</font></div>
<div class="gmail_default"><font face="georgia, serif">ImportError: Failed
to import test module:
nodeshot.core.metrics.tests</font></div>
<div class="gmail_default"><font face="georgia, serif">Traceback (most
recent call last):</font></div>
<div class="gmail_default"><font face="georgia, serif"> File
"/usr/lib/python2.7/unittest/loader.py",
line 254, in _find_tests</font></div>
<div class="gmail_default"><font face="georgia, serif"> module =
self._get_module_from_name(name)</font></div>
<div class="gmail_default"><font face="georgia, serif"> File
"/usr/lib/python2.7/unittest/loader.py",
line 232, in _get_module_from_name</font></div>
<div class="gmail_default"><font face="georgia, serif"> __import__(name)</font></div>
<div class="gmail_default"><font face="georgia, serif"> File
"/usr/local/lib/virtualenvs/nodeshot/src/nodeshot/nodeshot/core/metrics/__init__.py",
line 4, in <module></font></div>
<div class="gmail_default"><font face="georgia, serif"> from .utils
import create_database</font></div>
<div class="gmail_default"><font face="georgia, serif"> File
"/usr/local/lib/virtualenvs/nodeshot/src/nodeshot/nodeshot/core/metrics/utils.py",
line 5, in <module></font></div>
<div class="gmail_default"><font face="georgia, serif"> from . import
settings</font></div>
<div class="gmail_default"><font face="georgia, serif"> File
"/usr/local/lib/virtualenvs/nodeshot/src/nodeshot/nodeshot/core/metrics/settings.py",
line 5, in <module></font></div>
<div class="gmail_default"><font face="georgia, serif"> INFLUXDB_USER =
getattr(settings, 'INFLUXDB_USER')</font></div>
<div class="gmail_default"><font face="georgia, serif"> File
"/usr/local/lib/virtualenvs/nodeshot/local/lib/python2.7/site-packages/django/conf/__init__.py",
line 55, in __getattr__</font></div>
<div class="gmail_default"><font face="georgia, serif"> return
getattr(self._wrapped, name)</font></div>
<div class="gmail_default"><font face="georgia, serif">AttributeError:
'Settings' object has no attribute
'INFLUXDB_USER'</font></div>
<div class="gmail_default"><font face="georgia, serif"><br>
</font></div>
<div class="gmail_default"><font face="georgia, serif"><br>
</font></div>
<div class="gmail_default"><font face="georgia, serif">Destroying test
database for alias 'default'...</font></div>
<div class="gmail_default"><font face="georgia, serif"><br>
</font></div>
<div class="gmail_default"><font face="georgia, serif">Process finished
with exit code 1</font></div>
</div>
</div>
</div>
<br>
<fieldset></fieldset>
<br>
</div>
</div>
<pre>_______________________________________________
Nodeshot mailing list
<a href="mailto:Nodeshot@ml.ninux.org" target="_blank">Nodeshot@ml.ninux.org</a>
<a href="http://ml.ninux.org/mailman/listinfo/nodeshot" target="_blank">http://ml.ninux.org/mailman/listinfo/nodeshot</a>
</pre>
</blockquote>
<br>
</div>
<br>
_______________________________________________<br>
Nodeshot mailing list<br>
<a href="mailto:Nodeshot@ml.ninux.org" target="_blank">Nodeshot@ml.ninux.org</a><br>
<a href="http://ml.ninux.org/mailman/listinfo/nodeshot" target="_blank">http://ml.ninux.org/mailman/listinfo/nodeshot</a><br>
<br>
</blockquote>
</div>
<br>
</div>
<br>
<fieldset></fieldset>
<br>
<pre>_______________________________________________
Nodeshot mailing list
<a href="mailto:Nodeshot@ml.ninux.org" target="_blank">Nodeshot@ml.ninux.org</a>
<a href="http://ml.ninux.org/mailman/listinfo/nodeshot" target="_blank">http://ml.ninux.org/mailman/listinfo/nodeshot</a>
</pre>
</blockquote>
<br>
</div></div></div>
<br>_______________________________________________<br>
Nodeshot mailing list<br>
<a href="mailto:Nodeshot@ml.ninux.org">Nodeshot@ml.ninux.org</a><br>
<a href="http://ml.ninux.org/mailman/listinfo/nodeshot" target="_blank">http://ml.ninux.org/mailman/listinfo/nodeshot</a><br>
<br></blockquote></div><br></div>