Skip to content
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

Verifier: Param.Trigger verified against Plan names #1619

Closed
kensipe opened this issue Jul 21, 2020 · 2 comments
Closed

Verifier: Param.Trigger verified against Plan names #1619

kensipe opened this issue Jul 21, 2020 · 2 comments

Comments

@kensipe
Copy link
Member

kensipe commented Jul 21, 2020

We need to add a verifier That checks that Param.Trigger values are found in the set of the plan names and ERROR if not.

Closely related is: #1618
Prior to this PR, we didn't check trigger when warning that a param is not used... now we need to check if the param.trigger value is sensical value and if not provide an error. The example in verfiy_parameters_test.go is a good example. the newly added {Name: "TRIGGER_ONLY", Trigger: "foo"}, is a trigger on a plan that does not exist. While this may be ok for the current impl... we should have a verifier that errors for trigger that do not exist.

@nfnt
Copy link
Member

nfnt commented Jul 21, 2020

https://github.com/kudobuilder/kudo/blob/main/pkg/kudoctl/packages/verifier/plan/verify_references.go#L37 does that.
The unit test verify_parameters_test.go doesn't have this check, that's why behavior using non-existing names can be tested in isolation here. The integration tests in package_verify_test.go cover the case where a trigger is set to a non-existing plan.

@kensipe
Copy link
Member Author

kensipe commented Jul 21, 2020

woot! thank you

@kensipe kensipe closed this as completed Jul 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants