-
Notifications
You must be signed in to change notification settings - Fork 37
Open
Description
I have an endpoint in my bff service that returns ArrayOf(AccessControl) and we're generating the following:
// callValidator calls the user-specified validator function.
// The validator function must be defined in the test package.
func (r *ScenarioRunner) callValidator(t *testing.T, method string, result any, expect Expectation) {
// For each validator found in YAML, we generate a direct call
// Users must define these functions in their test files
validatorName := expect.Validator
_ = validatorName // avoid unused variable in case no validators are defined
switch method {
case "get_application_config":
typedResult := result.(*bff.ApplicationConfig)
_ = typedResult // no validators defined in YAML
t.Errorf("validator %!q(MISSING) specified but not generated - add it to scenarios.yaml first", validatorName)
case "get_access_control":
typedResult := result.(*bff.[]*AccessControl)Of course, *bff.[]AccessControl is wrong .. seems like []*bff.AccessControl is what's needed in this case.
Similar to #206 (likely the same root cause applies) but with a different call site.
Metadata
Metadata
Assignees
Labels
No labels