Re: [openstack-dev] [Fuel] Introducing bash unit testing

2015-07-09 Thread Mike Scherbakov
We need this. Please find a tool which suites best, and we will let Dmitry's team to enable it. I assume there is not such a thing in OpenStack Infra (otherwise we could just reuse it). Also, I would add a check, that any new bash file should not contain, let's say, more than 50 lines. If it is la

Re: [openstack-dev] [Fuel] Introducing bash unit testing

2015-07-09 Thread Oleg Gelbukh
And I realized all of a sudden that even more interesting than unittest framework itself would be some analog of Python mock for shell scripts. Though I doubt that anyone ever really gone that far. -- Best regards, Oleg Gelbukh On Thu, Jul 9, 2015 at 5:12 PM, Jeremy Stanley wrote: > On 2015-07-

Re: [openstack-dev] [Fuel] Introducing bash unit testing

2015-07-09 Thread Jeremy Stanley
On 2015-07-09 11:24:14 +0300 (+0300), Matthew Mosesohn wrote: > What about bashate? It is already in use in several OpenStack projects? [...] It's a style checker (its name is an allusion to the "pep8" tool for checking Python coding style conventions). And shellcheck (mentioned later in this thre

Re: [openstack-dev] [Fuel] Introducing bash unit testing

2015-07-09 Thread Bartlomiej Piotrowski
On Thu, Jul 9, 2015 at 10:27 AM, Oleg Gelbukh wrote: > I am one hundred percent support this proposal. > > Just to clarify, did you consider shunit2 > [1 ] > as a unittest framework for Bash? It seems a little bit closer to sh

Re: [openstack-dev] [Fuel] Introducing bash unit testing

2015-07-09 Thread Bartlomiej Piotrowski
On Thu, Jul 9, 2015 at 10:24 AM, Matthew Mosesohn wrote: > What about bashate? It is already in use in several OpenStack projects? > > https://github.com/openstack-dev/bashate > To be honest, I don't see any value of using bashate. It does some basic checks but none of them is insightful. Shellch

Re: [openstack-dev] [Fuel] Introducing bash unit testing

2015-07-09 Thread Oleg Gelbukh
I am one hundred percent support this proposal. Just to clarify, did you consider shunit2 [1 ] as a unittest framework for Bash? It seems a little bit closer to shell scripting itself, so you don't need to learn another syntax

Re: [openstack-dev] [Fuel] Introducing bash unit testing

2015-07-09 Thread Matthew Mosesohn
What about bashate? It is already in use in several OpenStack projects? https://github.com/openstack-dev/bashate On Jul 9, 2015 11:15 AM, "Bartlomiej Piotrowski" wrote: > Hi all, > > as hopefully everyone knows, it's very challenging to prove that Bash > encourages > writing readable, maintainab

[openstack-dev] [Fuel] Introducing bash unit testing

2015-07-09 Thread Bartlomiej Piotrowski
Hi all, as hopefully everyone knows, it's very challenging to prove that Bash encourages writing readable, maintainable code that actually works first time it is run. Sadly we have quite a long history of merging various shell scripts without any test coverage. Fortunately Peter Zhurba bore with