[openstack-dev] [Fuel] Get rid of run_test.sh in Fuel Client

Roman Prykhodchenko me at romcheg.me
Mon Aug 17 12:50:56 UTC 2015


Hi Fuelers!


I was working on enabling Python tests in Fuel Client to run on OpenStack CI and I figured out that we actually have a piece of legacy code which can be removed now. That piece is run_tests.sh file. For those who’s not aware, that script allows to run different tests under different environments. I don’t know how it was a thousand years ago when I was not involved to Fuel project, but the situation at this particular moment looks like that:

- Tests are actually orchestrated by tox
- The biggest job of run_tests.sh is to translate its options to tox’es options
- The only useful job of run_tests.sh is to start Nailgun correctly for functional tests

As you can see the profit of that script is tiny. However, the problems it brings are pretty much big and looks as follows:

- It is unstable — tiniest changes to tests require big changes to the script
- The CLI it provides is confusing
- Working on that file looks like doing the same job that is already done in tox
- Among the active Fuel Client’s community there are only a few guys who are proficient in bash enough, to support that script effectively


My proposal is to extract the code responsible for starting Nailgun into to a small utility script and let tox do the rest by removing run_test.sh completely. That will bring us the following advantages:

- No need to support a complex bash script.
- Closer to being able to run functional tests on DSVM gates.
- Test CLI will be more compatible with other OpenStack projects.

I foresee a few questions and the answers for them follow:

Q: How is verify-job from FuelCI going to run tests without that file?
A: Fuel Client has its own job on FuelCI, so it will be just necessary to change the invocation there.

Q: But run_test.sh is in all Fuel projects, shouldn’t we keep them all similar.
A: Why does it have to be similar? This kind of difference is minor and it brings more advantages, than just having the same file. In fact the set of options in run_tests.sh is already different from run_tests.sh in fuel-web.

Q: Why should we look ad other OpenStack projects?
A: Fuel is living in the OpenStack ecosystem so being compatible with it is a big advantage. It’s also a must for going big tent.


- romcheg




-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 842 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.openstack.org/pipermail/openstack-dev/attachments/20150817/f32c92e8/attachment.pgp>


More information about the OpenStack-dev mailing list