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

Create reusable test suite #15

Closed
Tracked by #1802
tzdybal opened this issue Oct 27, 2024 · 2 comments · Fixed by #50
Closed
Tracked by #1802

Create reusable test suite #15

tzdybal opened this issue Oct 27, 2024 · 2 comments · Fixed by #50

Comments

@tzdybal
Copy link
Member

tzdybal commented Oct 27, 2024

Test suite should be created to establish some minimal acceptance testing framework for implementations.

First test should mimic actual life of a chain - calling all the methods in right order, repeating this for some number of blocks.

See also #16.

The API is very generic, so we need to think about other tests to add.

Example of reusable test suite is implemented in go-da.

@tzdybal
Copy link
Member Author

tzdybal commented Jan 16, 2025

To be able to create meaningful integration tests, a way to submit transactions is needed. This is implementation specific and is not a part of Execution API.

Proposed solution is to add TxInjector field to Suite so there is unified way to inject transactions in tests.

// TxInjector provides an interface for injecting transactions into a test suite.
type TxInjector interface {
	InjectTx(tx types.Tx)
}

tzdybal added a commit that referenced this issue Jan 16, 2025
Introduced the TxInjector interface for injecting transactions into test cases. Updated ExecutorSuite, proxy_test, and DummyTestSuite to utilize TxInjector. Adjusted test assertions to validate transaction injection functionality.

Resolves #15
@tzdybal tzdybal moved this from In Progress to For Review in Rollkit Jan 16, 2025
github-merge-queue bot pushed a commit that referenced this issue Jan 16, 2025
Introduced the TxInjector interface for injecting transactions into test cases. Updated ExecutorSuite, proxy_test, and DummyTestSuite to utilize TxInjector. Adjusted test assertions to validate transaction injection functionality.

Resolves #15
@github-project-automation github-project-automation bot moved this from For Review to Done in Rollkit Jan 16, 2025
Copy link

🎉 This issue has been resolved in version 0.2.2 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants