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

Extensions: provide PhylumApi mocks for testing extensions through the CLI #450

Open
andreaphylum opened this issue Jun 8, 2022 · 2 comments
Labels
enhancement New feature or request extensions Phylum CLI extensions medium priority Should be handled as soon as possible

Comments

@andreaphylum
Copy link
Contributor

We need to test extensions against API mocks, and figure out whether it is best to try and reuse the mocks already present in other tests or whether we may need to expand those/go in a different direction.

@andreaphylum andreaphylum added enhancement New feature or request needs triage Needs to be reviewed or assigned labels Jun 8, 2022
@andreaphylum andreaphylum added this to the Extensions MVP milestone Jun 8, 2022
@kylewillmon
Copy link
Contributor

I'm not sure we need a complete mock here (at least not for MVP). We definitely need a test that executes something with the deno API though (as @cd-work mentioned here)

Maybe that just means updating our sample extension so that it calls back into the rust code to do something trivial?

@kylewillmon kylewillmon added medium priority Should be handled as soon as possible extensions Phylum CLI extensions and removed needs triage Needs to be reviewed or assigned labels Jun 9, 2022
@andreaphylum
Copy link
Contributor Author

Maybe that just means updating our sample extension so that it calls back into the rust code to do something trivial?

In this way we can test that we can reach that functionality (which sort of just works anyway) but we won't get a proper idea of the coverage for the serialization layer which is what concerns me -- i.e. having a solid, well-understood and non-surprising translation between V8 types and Rust types so that the API can cooperate effectively. This should also just work on the Rust side but I don't have enough experience with Deno to tell what caveats there may be in forming types on that side.

@cd-work cd-work removed this from the Extensions MVP milestone Aug 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request extensions Phylum CLI extensions medium priority Should be handled as soon as possible
Projects
None yet
Development

No branches or pull requests

3 participants