<div dir="ltr">Hi Yogesh,<div><br></div><div>The best way to start writing tests is to get some examples from tests already implemented. Since icehouse release, all tests must be written with mock¹. Most of the tests on the codebase are written with the old framework (mox), please have a look on this implementations:</div>
<div><br></div><div>cinder/tests/{test_hp3par.py,test_ibmnas.py, test_netapp_eseries_iscsi.py}</div><div><br></div><div>This² is also an implementation Im working in using mock.</div><div><br></div><div>Kind Regards,</div>
<div>Erlon</div><div><br></div><div><br></div><div><br></div><div>¹ <a href="https://github.com/openstack/cinder/blob/master/HACKING.rst">https://github.com/openstack/cinder/blob/master/HACKING.rst</a> </div><div>² <a href="https://review.openstack.org/#/c/84244/">https://review.openstack.org/#/c/84244/</a><br>
</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Fri, May 30, 2014 at 6:05 AM, Yogesh Prasad <span dir="ltr"><<a href="mailto:yogesh.prasad@cloudbyte.com" target="_blank">yogesh.prasad@cloudbyte.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"><br clear="all"><div>Hi All,</div><div>I have developed a cinder driver. Can you please share the steps to create an unit test environment and how to run unit test? </div>
<br><div dir="ltr"><div style="font-family:arial;font-size:small">
<u>Thanks & Regards</u>,</div><div style="font-family:arial;font-size:small"> Yogesh Prasad.</div></div>
</div>
<br>_______________________________________________<br>
OpenStack-dev mailing list<br>
<a href="mailto:OpenStack-dev@lists.openstack.org">OpenStack-dev@lists.openstack.org</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>