jaas icon indicating copy to clipboard operation
jaas copied to clipboard

Unit tests for service spec creation

Open MarcPer opened this issue 7 years ago • 3 comments

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.

MarcPer avatar Jul 09 '18 16:07 MarcPer

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.

MarcPer avatar Jul 09 '18 16:07 MarcPer

All flags that define the created docker service were tested with unit tests.

MarcPer avatar Jul 14 '18 18:07 MarcPer

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

alexellis avatar Nov 09 '18 09:11 alexellis