No subject


Sun Dec 12 18:29:16 UTC 2010


they should be stateless. You can fudge it by hacking argv, but then you
lose flexibility of the many useful nose command-line params.

Dave


>
> David
>>
>> _______________________________________________
>> ckan-dev mailing list
>> ckan-dev at lists.okfn.org
>> http://lists.okfn.org/mailman/listinfo/ckan-dev
>>
>>
>
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> http://lists.okfn.org/mailman/listinfo/ckan-dev
>
>

--00163630f2b9208395049b712bc7
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<br><br><div class=3D"gmail_quote">On 3 February 2011 22:35, David Raznick =
<span dir=3D"ltr">&lt;<a href=3D"mailto:kindly at gmail.com">kindly at gmail.com<=
/a>&gt;</span> wrote:<br><blockquote class=3D"gmail_quote" style=3D"margin:=
0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<br><br><div class=3D"gmail_quote"><div class=3D"im">On Thu, Feb 3, 2011 at=
 9:50 PM, David Read <span dir=3D"ltr">&lt;<a href=3D"mailto:david.read at okf=
n.org" target=3D"_blank">david.read at okfn.org</a>&gt;</span> wrote:<br><bloc=
kquote class=3D"gmail_quote" style=3D"margin:0pt 0pt 0pt 0.8ex;border-left:=
1px solid rgb(204, 204, 204);padding-left:1ex">

Hi all,<br><br>I&#39;ve changed buildbot to run ckan tests twice now: first=
ly with sqlite and then again with postgres in the same buildbot script (I =
should split it into two tasks, but that is for another day). I&#39;ve fixe=
d a few problems with the tests under sqlite and they pass now, but there a=
re still problems with tests in postgres.<div>


<br></div><div>Seb changed lots of &#39;rebuild_db&#39; statements to &#39;=
clean_db&#39;, which then requires &#39;init_db&#39; at the start of the ne=
xt test. So there are now &#39;init_db&#39; statements at the start of a gr=
eat many tests. Was there any reason for this? </div>

</blockquote></div><div><br>This may not be necessary any more with the fix=
 we did the other day on migrate.=A0 However, the in memory sqlite database=
 gets lost mysteriously sometimes and its hard to figure out where.=A0 That=
 is why I thought the init_dbs were there.<br>

</div></div></blockquote><div><br></div><div>These problems are with postgr=
es in this case, and there is no mystery about losing the d.b. - we call cl=
ean_db!=A0</div><div><br></div><div>Note to Seb: Things were probably worki=
ng in the past because the &#39;faster_db_hacks&#39; config option wasn&#39=
;t being read properly, which David and I fixed last Friday, so the full in=
it_db was happening even with postgres, whereas it&#39;s not now. Also the =
init_db parameter &#39;conditional&#39; (BTW what a terrible name for a par=
ameter...!) is not being used. I think basically this all needs a bit of a =
review / tidy up to get it to make sense and work too.</div>
<div>=A0</div><blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;=
border-left:1px #ccc solid;padding-left:1ex;"><div class=3D"gmail_quote"><d=
iv class=3D"im"><blockquote class=3D"gmail_quote" style=3D"margin:0pt 0pt 0=
pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left:1ex">
<div>It seems a right faff to remember this - is there no better way? Indee=
d I believe the current test failures are caused by a test not having a ini=
t_db.</div>

<div><br>Note for everyone: Seb, James and I have agreed to set in test.ini=
 to use sqlite.</div></blockquote></div><div><br>I disagree to this.=A0 You=
 should specify what database you want in your own development.ini.=A0 The =
template development.ini could have sqlite as the default instead.=A0 This =
is the only sane way to do it in my opinion.<br>
</div></div></blockquote><div><br></div><div>Yes this might be better. Anyo=
ne else?=A0</div><div>=A0</div><blockquote class=3D"gmail_quote" style=3D"m=
argin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div class=
=3D"gmail_quote">
<div></div><div class=3D"im"><blockquote class=3D"gmail_quote" style=3D"mar=
gin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204);padding-left=
:1ex"><div> We think it is a good idea to default tests to being run quickl=
y. However, I can&#39;t see a good way to then run tests under postgres - i=
f you comment out the sqlite in test.ini (as the buildbot currently does), =
9/10 times you end up checking it in by mistake. Maybe someone has a better=
 idea, since passing parameters to nose is a no no.<br>

</div></blockquote></div><div><br>Why is this a no no?<br></div></div></blo=
ckquote><div><br></div><div>From what I read, nose doesn&#39;t believe in p=
assing parameters onto tests - they should be stateless. You can fudge it b=
y hacking argv, but then you lose flexibility of the many useful nose comma=
nd-line params.</div>
<div><br></div><div>Dave</div><div>=A0</div><blockquote class=3D"gmail_quot=
e" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"=
><div class=3D"gmail_quote"><div><br></div><blockquote class=3D"gmail_quote=
" style=3D"margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204, 204, 204=
);padding-left:1ex">
<div><font color=3D"#888888">David</font></div>

<br>_______________________________________________<br>
ckan-dev mailing list<br>
<a href=3D"mailto:ckan-dev at lists.okfn.org" target=3D"_blank">ckan-dev at lists=
.okfn.org</a><br>
<a href=3D"http://lists.okfn.org/mailman/listinfo/ckan-dev" target=3D"_blan=
k">http://lists.okfn.org/mailman/listinfo/ckan-dev</a><br>
<br></blockquote></div><br>
<br>_______________________________________________<br>
ckan-dev mailing list<br>
<a href=3D"mailto:ckan-dev at lists.okfn.org">ckan-dev at lists.okfn.org</a><br>
<a href=3D"http://lists.okfn.org/mailman/listinfo/ckan-dev" target=3D"_blan=
k">http://lists.okfn.org/mailman/listinfo/ckan-dev</a><br>
<br></blockquote></div><br>

--00163630f2b9208395049b712bc7--



More information about the ckan-dev mailing list