<div dir="ltr"><div><div><div><div><div>Hi,<br><br></div>I've created a patchset that introduces a script to run Python tests in fuel-library [1] and a<br></div><div>Jenkins job [2]<br></div><div><br></div>I also would like to backport those tests to stable branches to assure that any fix backported to stable branches will be also<br></div>checked.<br><br></div>Best,<br></div>Sebastian<br><br>[1] <a href="https://review.openstack.org/#/c/157319/">https://review.openstack.org/#/c/157319/</a><br>[2] <a href="https://review.fuel-infra.org/#/c/3810/">https://review.fuel-infra.org/#/c/3810/</a><br></div><div class="gmail_extra"><br><div class="gmail_quote">2015-02-18 16:01 GMT+01:00 Aleksandr Didenko <span dir="ltr"><<a href="mailto:adidenko@mirantis.com" target="_blank">adidenko@mirantis.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>Hi,<br><br></div>I agree that we need a better testing for python tasks/code. There should be no problems adding py.test tests into fuel-library CI, we already have one [1] up and running. So I'm all in and ready to help with such testing implementation.<br><br>[1] <a href="https://fuel-jenkins.mirantis.com/job/fuellib_tasks_graph_check/" target="_blank">https://fuel-jenkins.mirantis.com/job/fuellib_tasks_graph_check/</a><br><br></div>Regards,<br>Aleksandr<br></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Feb 18, 2015 at 4:02 PM, Vladimir Kuklin <span dir="ltr"><<a href="mailto:vkuklin@mirantis.com" target="_blank">vkuklin@mirantis.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi, Seb<div><br></div><div>Very fair point, thank you. We need to add this to our jobs for unittests run and syntax check. I am adding Aleksandr Didenko into the loop as he is currently working on the similar task.</div></div><div class="gmail_extra"><div><div><br><div class="gmail_quote">On Wed, Feb 18, 2015 at 4:53 PM, Jay Pipes <span dir="ltr"><<a href="mailto:jaypipes@gmail.com" target="_blank">jaypipes@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span>On 02/18/2015 04:57 AM, Sebastian Kalinowski wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello Fuelers,<br>
<br>
There is more and more Python code appearing in fuel-library [1] that is<br>
used in our Puppet manifests. Now, with introduction of Granular<br>
Deployment feature it could appear more often as<br>
writing some tasks as a Python script is a nice option.<br>
<br>
First problem that I see is that in some cases this code is getting<br>
merged without a positive review from a Python developer from Fuel team.<br>
My proposition of the solution is simple:<br>
fuel-library core reviewers shouldn't merge such code if there is no a<br>
+1 from a Python developer from fuel-core group [2].<br>
<br>
Second problem is that there are no automatic tests for this code.<br>
Testing it manually and by running deployment when that code is used is<br>
not enough since those scripts could be quite large and complicated and<br>
some of them are executed in specific situations so it is hard for<br>
reviewers to check how they will work.<br>
In fuel-library we already have tests for Puppet modules: [3].<br>
I suggest that we should introduce similar checks for Python code:<br>
- there will be one global 'test-requirements.txt' file (if there will<br>
be a need to, we could introduce more granular split, like per module)<br>
- py.test [4] will be used as a test runner<br>
- (optional, but advised) flake8+hacking checks [5] (could be limited<br>
to just run flake8/pyflakes checks)<br>
<br>
Looking forward to your opinions on those two issues.<br>
</blockquote>
<br></span>
Hi Seba,<br>
<br>
All those suggestions look fine to me. I'd also add to improve the documentation on how to write and run Python tests to help out those developers who are not as familiar with Python as Ruby or other languages.<br>
<br>
Best,<br>
-jay<br>
<br>
______________________________<u></u>______________________________<u></u>______________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" target="_blank">OpenStack-dev-request@lists.<u></u>openstack.org?subject:<u></u>unsubscribe</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/<u></u>cgi-bin/mailman/listinfo/<u></u>openstack-dev</a><br>
</blockquote></div><br><br clear="all"><div><br></div></div></div>-- <br><div><div dir="ltr">Yours Faithfully,<br>Vladimir Kuklin,<br>Fuel Library Tech Lead,<br>Mirantis, Inc.<br><a href="tel:%2B7%20%28495%29%20640-49-04" value="+74956404904" target="_blank">+7 (495) 640-49-04</a><br><a href="tel:%2B7%20%28926%29%20702-39-68" value="+79267023968" target="_blank">+7 (926) 702-39-68</a><br>Skype kuklinvv<br>45bk3, Vorontsovskaya Str.<br>Moscow, Russia,<br><a href="http://www.mirantis.ru/" target="_blank">www.mirantis.com</a><br><a href="http://www.mirantis.ru/" target="_blank">www.mirantis.ru</a><br><a href="mailto:vkuklin@mirantis.com" target="_blank">vkuklin@mirantis.com</a></div></div>
</div>
</blockquote></div><br></div>
</div></div><br>__________________________________________________________________________<br>
OpenStack Development Mailing List (not for usage questions)<br>
Unsubscribe: <a href="http://OpenStack-dev-request@lists.openstack.org?subject:unsubscribe" target="_blank">OpenStack-dev-request@lists.openstack.org?subject:unsubscribe</a><br>
<a href="http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev" target="_blank">http://lists.openstack.org/cgi-bin/mailman/listinfo/openstack-dev</a><br>
<br></blockquote></div><br></div>