NOTE: In the below examples we will be creating a service called football
.
Create new .proto
files under /api
following this doc.
To decide which service to create read the docs here.
The code generated by hammer
has a bunch of TODO comments that need to be resolved. You need to resolve those.
Write your unit tests along side your service code.
Write your integration tests under a new directory test/integration/football
.
For functional tests you can do either OR both of the below:
- Write your functional tests under a new directory
test/functional/football
- Use an existing functional test under
test/functional
Update the values.yaml
and azure-pipelines.yml
to enable/disable the integration and/or functional tests you need for this new service:
# Example of service with NO integration tests and TWO functional tests
# file: internal/football/values.yaml
...
rollout:
testing:
integration:
isEnabled: false
functional:
isEnabled: true
tests:
- football
- soccer
...
# file: internal/football/azure-pipelines.yml
parameters:
- name: serviceName
type: string
default: football
- name: integrationTests
type: object
default: {}
- name: functionalTests
type: object
default:
- football
- soccer
trigger:
branches:
include:
- main
paths:
include:
- deployments
- internal/football
- pkg
- test/functional/shared-scripts
- test/functional/football
- test/functional/soccer
...
Test in your own namespace using the Makefile
targets here.
Open your PR to main
following the PR guidelines here.