title | authors | reviewers | approvers | creation-date | last-updated | status | |||
---|---|---|---|---|---|---|---|---|---|
QA Samples Proposal |
|
|
|
2019-11-22 |
2019-11-22 |
implementable |
- Enhancement is
implementable
- Design details are appropriately documented from clear requirements
- Test plan is defined
- Graduation criteria for dev preview, tech preview, GA
- User-facing documentation is created in operator-sdk/doc
The Operator SDK has a repo with sample projects. This proposal describes quality improvements in for the sample projects.
- Address issues raised in the repository such as ; Provide docker images for the samples, Add coveralls, Add unit test to cover the project, Add CI tests.
- Make easier the process to review changes made for the projects
- Help users know how they can achieve common good practices
- As a maintainer, I would like to ensure that samples projects continue to work after the changes performed in the PR are applied
- As an operator developer, I would like to know how to cover the projects with tests
- As an operator developer, I would like to know how to use the test-frameworkto do unit and integration tests
- As an operator developer, I would like to know how to call the tests in the CI and integrate them with Travis
- As an operator developer, I would like to know good practices to ensure the quality of my operators projects
NOTE The above goals are valid for the 3 types/projects Go, Ansible and Helm
- Change the code business logic implementation of the projects
- Cover the projects with unit and integration tests.
- Integrate projects with Travis
- Integrate projects with Coveralls
- I as a GO operator developer, I would like to know how to cover the projects with unit tests using the test-framework
Acceptance Criteria
- The GO project should have a minimum of 70% of its implementation covered by unit tests.
- The tests should all pass.
- The project should have a makefile target to call the tests
- A section with a short info over how to tests and the links for its documents in the README of the project
- The tests should be done using the default GO testing lib and the test-frameworkprovided by SDK
NOTES
- See here an example of how to cover the controller.
- See here an example of how to create the fake client.
- I as a Go dev operator user, I'd like to know how to cover the projects with integration tests using the test-framework
Acceptance Criteria
- The GO project should be covered with a few basic integration tests
- The tests should all pass.
- The project should have a makefile target to call the integration test
- A section with a short info over how to tests and the links for its documents in the README of the project
- The tests should be done using the default GO testing lib and the test-framework provided by SDK
- As an Ansible operator developer, I would like to know how to cover the projects with unit tests using molecule
Acceptance Criteria
- The Ansible project should be covered by tests using molecule which by default is scaffold
- The tests should all pass.
- A section with a short info over how to tests and the links for its documents in the README of the project
- The project should have a makefile target to call the tests
- As an Helm operator developer, I would like to how to cover the projects with tests
Acceptance Criteria
- The Helm project should have test shell scripts as seen here.- The tests should all pass.
- A section with a short info over how to tests and the links for its documents in the README of the project
- The project should have a makefile target to call the tests
- As an Ansible operator developer, I'd like to how to cover the projects with integration tests using molecule
Acceptance Criteria
- The Ansible project should have a few integration tests using molecule which by default is scaffold
- The tests should all pass.
- A section with a short info over how to tests and the links for its documents in the README of the project
- The project should have a makefile target to call the tests
- As an operator-sdk maintainer, I would like ensure that samples continue to work after the changes performed in the PR are applied.
- As an operator developer, I would like to know how to call the tests in the CI and integrate them with Travis
Acceptance Criteria
- The Ansible, Helm and Go project should be integrated with Travis
- All PRs against the master branch should trigger the CI
- The unit and integration tests should be checked in the CI
- The CI should fail if one of the tests do not pass
- As an operator developer, I'd like to know good practices to ensure the quality of my operators projects
Acceptance Criteria
- Ansible and GO Memcached samples should be integrated with Coveralls
- All above stories should be achieved successfully
Coveralls may not work well with molecule, if this is the case we can just not integrate with it or we can find a similar tool.