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

Custom Values: add proper tests of the interface #1134

Closed
jsdw opened this issue Aug 22, 2023 · 0 comments · Fixed by #1147
Closed

Custom Values: add proper tests of the interface #1134

jsdw opened this issue Aug 22, 2023 · 0 comments · Fixed by #1147
Assignees

Comments

@jsdw
Copy link
Collaborator

jsdw commented Aug 22, 2023

In #1117 we add a statically generated interface for custom values. We test that the codegen doesn't blow up, but should also test that generated interface itself works.

Probably we want to

  1. write a script that can spit out metadata that contains a bunch of custom values in (the custom values are fully contained in the metadata, so it doesn't matter about the rest of this metadata; it can just be empty).
  2. Use the subxt macro pointed at this artifacts/metadata_with_custom_values.scale to generate an interface in some test file
  3. Try fetching values via static and dynamic interface to check that it all works as hoped.

(1) is a bit tricky; currently we have a scripts/artifacts.sh file to generate them. I'd lean towards adding a small testing/generate_custom_metadata binary crate that can spit it out, and then having this script call cargo run on it eg cargo run --bin testing-generate-custom-metadata > artifacts/metadata_with_custom_values.scale.

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

Successfully merging a pull request may close this issue.

2 participants