<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<br>
1) If you don't run the tests as root some test cases will be
bypassed.<br>
<br>
2) What I think that happened to you was that you run at least once
Kimchi as root and it created the database.<br>
In the second time, when running without root permission it was not
able to open the database.<br>
<br>
3) You can use tests/run_tests.sh to run the tests cases.<br>
<br>
<br>
<div class="moz-cite-prefix">On 08/09/2015 07:47, Harshal Patil
wrote:<br>
</div>
<blockquote
cite="mid:201509081059.t88AxFKF031275@d28av02.in.ibm.com"
type="cite">
<div class="socmaildefaultfont" dir="ltr"
style="font-family:Arial;font-size:10.5pt">
<div 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: <a class="moz-txt-link-abbreviated" href="mailto:kimchi-devel@ovirt.org">kimchi-devel@ovirt.org</a><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>
</div>
<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Kimchi-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Kimchi-devel@ovirt.org">Kimchi-devel@ovirt.org</a>
<a class="moz-txt-link-freetext" href="http://lists.ovirt.org/mailman/listinfo/kimchi-devel">http://lists.ovirt.org/mailman/listinfo/kimchi-devel</a>
</pre>
</blockquote>
<br>
</body>
</html>