MuditaOS
MuditaOS copied to clipboard
Development workflow: Unit testing for scripts required
⚠️ Development workflow: Unit testing for scripts required
📝 Description
There are no method of unit testing scripts. As a result, pull requests that modify scripts are viewed as risky and therefore left to languish indefinitely. Being able to test script changes in an automated fashion is necessary to enable trust in community originating fixes.
📝 Describe the solution you'd like
An additional unit testing target group (e.g. make scriptcheck) should be made. Additionally, Jenkins should run it (only) when a script file is modified. It is advisable to use an existing script unit testing framework.
📝 Describe alternatives you've considered
Refuse all pull requests involving scripts from community members.
Unfortunately, I'm afraid it will be very time-consuming right now and we just straight do not have the capacity to do so. What's more - it's a nontrivial task as writing tests for ready-to-go software is always harder. Even organizing the environment for script testing is a nontrivial matter for us. Do you happen to have know-how on how we could achieve it?
Shellspec seems like a good fit since there is no need to test the internal functionality when all that is required is to verify the script behavior.
@GravisZro Can you provide an example script based on our existing script? For example our bootstrap.sh?
@GravisZro We don't have that many scripts, and implementing this feature seems to be non-trivial and time consuming, so currently we won't be implementing it. We'll let you know if anything changes in that matter.