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

Endpoint specific fixtures cannot be called by generic fixtures #63

Open
tanx16 opened this issue Oct 9, 2020 · 0 comments
Open

Endpoint specific fixtures cannot be called by generic fixtures #63

tanx16 opened this issue Oct 9, 2020 · 0 comments

Comments

@tanx16
Copy link
Contributor

tanx16 commented Oct 9, 2020

fuzz-lightyear has a test case,test_nested_endpoint_dependency_uses_default , which currently fails. We want to support this case in the future, but making this change is somewhat difficult. Here's the problem:

Consider the following:

  • A nested_dependency that is registered for generic endpoints, returning caller * 2
  • A caller that is registered for generic endpoints and new_opid, returning dependency + 1 and dependency + 2 respectively
  • A dependency registered for generic endpoints that returns 1.

Now, when we call nested_dependency with the new_opid endpoint, we get 4 instead of 6. This is because nested_dependency is generic, so when we call register_factory it doesn't call inject_user_defined_variables with the list of operation_ids, since there is no list. Fixing this issue will require us to pass in the endpoint called into the wrapped function, and selecting which caller to use at that time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant