<div class="socmaildefaultfont" dir="ltr" style="font-family:Arial;font-size:10.5pt" ><div dir="ltr" >so if I run this as a root with, </div>
<div dir="ltr" > </div>
<div dir="ltr" >export PYTHONPATH=../src && python -m unittest test_host </div>
<div dir="ltr" > </div>
<div dir="ltr" >It works for test_host.py test cases. Should we try to improve our tests such that no root is required? </div>
<div dir="ltr" > </div>
<div dir="ltr" >Harshal</div>
<div dir="ltr" > </div>
<blockquote data-history-content-modified="1" dir="ltr" style="border-left:solid #aaaaaa 2px; margin-left:5px; padding-left:5px; direction:ltr" >----- Original message -----<br>From: Harshal Patil/India/IBM<br>To: kimchi-devel@ovirt.org<br>Cc:<br>Subject: Unable run unit test cases<br>Date: Tue, Sep 8, 2015 3:59 PM<br>
<div dir="ltr" style="font-family:Arial;font-size:10.5pt" ><div dir="ltr" >Hi,</div>
<div dir="ltr" > </div>
<div dir="ltr" >Trying to run unit tests on kimchi master branch, but getting following error. Am I missing something obvious? </div>
<div dir="ltr" > </div>
<div dir="ltr" > </div>
<div dir="ltr" >harshal@harshal-ThinkPad-T420:~/git/kimchi/tests$ ./run_tests.sh -v<br>Plugin configuration file /home/harshal/git/kimchi/plugins/kimchi/kimchi.conf doesn't exist.<br>Traceback (most recent call last):<br> File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main<br> "__main__", fname, loader, pkg_name)<br> File "/usr/lib/python2.7/runpy.py", line 72, in _run_code<br> exec code in run_globals<br> File "/usr/lib/python2.7/unittest/__main__.py", line 12, in <module><br> main(module=None)<br> File "/usr/lib/python2.7/unittest/main.py", line 94, in __init__<br> self.parseArgs(argv)<br> File "/usr/lib/python2.7/unittest/main.py", line 149, in parseArgs<br> self.createTests()<br> File "/usr/lib/python2.7/unittest/main.py", line 158, in createTests<br> self.module)<br> File "/usr/lib/python2.7/unittest/loader.py", line 130, in loadTestsFromNames<br> suites = [self.loadTestsFromName(name, module) for name in names]<br> File "/usr/lib/python2.7/unittest/loader.py", line 91, in loadTestsFromName<br> module = __import__('.'.join(parts_copy))<br> File "test_yumparser.py", line 96, in <module><br> @unittest.skipIf(not _is_yum_distro(), 'Skipping: YUM exclusive test')<br> File "test_yumparser.py", line 36, in _is_yum_distro<br> inst = model.Model('test:///default')<br> File "/home/harshal/git/kimchi/src/kimchi/model/model.py", line 32, in __init__<br> self.objstore = ObjectStore(objstore_loc)<br> File "/home/harshal/git/kimchi/src/kimchi/objectstore.py", line 90, in __init__<br> self._init_db()<br> File "/home/harshal/git/kimchi/src/kimchi/objectstore.py", line 93, in _init_db<br> conn = self._get_conn()<br> File "/home/harshal/git/kimchi/src/kimchi/objectstore.py", line 116, in _get_conn<br> timeout=10)<br>sqlite3.OperationalError: unable to open database file</div>
<div dir="ltr" > </div></div></blockquote>
<div dir="ltr" > </div></div><BR>