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

feature(integrations): add an integrations test harness for substreams modules #63

Closed

Conversation

Ryanmtate
Copy link
Contributor

Resolves #62

The integrations crate provides a module test harness, calling the substreams cli to run each of the modules and cache the results to be compared on the next run.

Cached results are saved in the integrations/target/ folder and can be run locally. The cached results are not committed to the repository, instead they can be restored in the github ci workflow for comparison.

NOTE: There is some beginning work on calling the substreams grpc blocks endpoint directly using the substreams playground example as a guide, however, I have not been able to call the endpoint successfully and reverting to using the substreams CLI in the meantime.

@Ryanmtate Ryanmtate mentioned this pull request Sep 22, 2022
4 tasks
@Ryanmtate Ryanmtate force-pushed the feature/integration-harness branch 2 times, most recently from 2f457f1 to 337976f Compare September 22, 2022 04:07
@0xbe1
Copy link
Contributor

0xbe1 commented Sep 22, 2022

There is some beginning work on calling the substreams grpc blocks endpoint directly using the substreams playground example as a guide, however, I have not been able to call the endpoint successfully and reverting to using the substreams CLI in the meantime.

let's just use substreams CLI

@Ryanmtate Ryanmtate force-pushed the feature/integration-harness branch 6 times, most recently from b5a1bdf to 220e19e Compare September 24, 2022 00:12
@Ryanmtate
Copy link
Contributor Author

After talking with @this-username-is-taken today, need to give integrations further thought. Would like to compare the output of the subgraph against the output of the substreams module. Need to do some investigations into the best way to automate a subgraph <> substreams output comparison.

For now, the integration harness is just checking the output from a single module against subsequent runs. When changes to the schema are made it will change the result and fail tests. Therefore, there needs to be a version of the module associated with tests. Since schemas typically only have major versions, we may wish to adopt a package version that is tightly coupled with the versioning of the protobuf package.

The integrations crate provides a module test harness,
calling the substreams cli to run each of the modules
and cache the results to be compared on the next run.

Cached results are saved in the integrations/target/
folder and can be run locally. The cached results are
not committed to the repository, instead they can be
restored in the github ci workflow for comparison.

NOTE: There is some beginning work on calling the
substreams grpc blocks endpoint directly using the
substreams playground example as a guide, however, I
have not been able to call the endpoint successfully
and reverting to using the substreams CLI in the meantime.

Signed-off-by: Ryan Tate <ryan.michael.tate@gmail.com>
Signed-off-by: Ryan Tate <ryan.michael.tate@gmail.com>
Signed-off-by: Ryan Tate <ryan.michael.tate@gmail.com>
Signed-off-by: Ryan Tate <ryan.michael.tate@gmail.com>
Signed-off-by: Ryan Tate <ryan.michael.tate@gmail.com>
@Ryanmtate Ryanmtate force-pushed the feature/integration-harness branch 5 times, most recently from 4289ce1 to d5c044d Compare September 27, 2022 04:57
Signed-off-by: Ryan Tate <ryan.michael.tate@gmail.com>
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 this pull request may close these issues.

Integration Test Harness
3 participants