@@ -176,24 +176,24 @@ func validateLabelSelector(labelSelector *v1.LabelSelector, fld *field.Path) (em
176
176
return s .Empty (), nil
177
177
}
178
178
179
- func (v * Validator ) validateResource (resource string ) * field.Error {
180
- if ! utils .In (resource , testtrigger .GetSupportedResources ()) {
179
+ func (v * Validator ) validateResource (resource testtriggerv1. TestTriggerResource ) * field.Error {
180
+ if ! utils .In (string ( resource ) , testtrigger .GetSupportedResources ()) {
181
181
fld := field .NewPath ("spec" ).Child ("resource" )
182
182
return field .NotSupported (fld , resource , testtrigger .GetSupportedResources ())
183
183
}
184
184
return nil
185
185
}
186
186
187
- func (v * Validator ) validateAction (action string ) * field.Error {
188
- if ! utils .In (action , testtrigger .GetSupportedActions ()) {
187
+ func (v * Validator ) validateAction (action testtriggerv1. TestTriggerAction ) * field.Error {
188
+ if ! utils .In (string ( action ) , testtrigger .GetSupportedActions ()) {
189
189
fld := field .NewPath ("spec" ).Child ("action" )
190
190
return field .NotSupported (fld , action , testtrigger .GetSupportedActions ())
191
191
}
192
192
return nil
193
193
}
194
194
195
- func (v * Validator ) validateExecution (execution string ) * field.Error {
196
- if ! utils .In (execution , testtrigger .GetSupportedExecutions ()) {
195
+ func (v * Validator ) validateExecution (execution testtriggerv1. TestTriggerExecution ) * field.Error {
196
+ if ! utils .In (string ( execution ) , testtrigger .GetSupportedExecutions ()) {
197
197
fld := field .NewPath ("spec" ).Child ("execution" )
198
198
return field .NotSupported (fld , execution , testtrigger .GetSupportedExecutions ())
199
199
}
0 commit comments