Unit tests for service spec creation
Signed-off-by: Marcelo Pereira [email protected]
Description
This PR addresses issue https://github.com/alexellis/jaas/issues/36.
Unit tests were added for checking the generated service spec. A make task was also included for running the tests.
Motivation and Context
This was done to increase test coverage, specifically for the run command.
How Has This Been Tested?
The unit tests were checked with go test locally and on Travis CI. Furthermore, the jaas run command was run with all possible flags and the resulting swarm services were checked.
Types of changes
- [x] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to change)
Checklist:
- [ ] My code follows the code style of this project.
- [ ] My change requires a change to the documentation.
- [ ] I have updated the documentation accordingly.
- [x] I have added tests to cover my changes.
- [x] All new and existing tests passed.
Sorry for adding a PR that is not finished, but this way it is already clear where I'm going and I can get some feedback before adding more tests. I will also create an issue for this.
All flags that define the created docker service were tested with unit tests.
Hi @MarcPer, sorry that this fell off my radar, I don't even remember seeing notifications for this PR.
It looks useful, but I'll need to find some time to go through this in detail and test it before merging.
Alex