-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add AddLabel()/AddAnnotation() for Route #447
Add AddLabel()/AddAnnotation() for Route #447
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
right, this needs tests as in https://github.com/openstack-k8s-operators/lib-common/blob/main/modules/common/service/service_test.go#L479 . specify a default Route starting with no annotation, then:
- add a annotation
- add another annotation should have 2
- override an annotation (first one remains)
you could just make a copy of service.TestOverrideSpecAddAnnotation and change it for the Route use case.
281df61
to
2c3756f
Compare
Signed-off-by: Elvira García <egarciar@redhat.com>
2c3756f
to
0a18b4f
Compare
}, | ||
} | ||
|
||
for _, tt := range tests { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be honest I'm aware this for on L71 might not needed yet, because I just described one route. However I thought I could leave this like that since we could expect this test to be expanded in a near future.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm thanks!
I think this might need testing, but looking at similar PR (#418) I did not fully understand how I should create something similar to what we see there in "modules/common/service/service_test.go" for the Route struct.