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

Tests talk to Solana for real, and they fail #149

Open
j-h-a opened this issue Feb 4, 2022 · 4 comments
Open

Tests talk to Solana for real, and they fail #149

j-h-a opened this issue Feb 4, 2022 · 4 comments

Comments

@j-h-a
Copy link
Contributor

j-h-a commented Feb 4, 2022

The tests are currently failing, and it appears some use the real NetworkingRouter and actually talk to a GenesysGo devnet node.

This is undesirable for a number of reasons.

Fix is to implement a mock version of SolanaRouter that provides appropriate responses for each test case.

@j-h-a
Copy link
Contributor Author

j-h-a commented Feb 15, 2022

@ajamaica I notice on #137 you mentioned you were planning to fix the tests to use a recent block. Is it deliberate to talk to actual devnet during the tests, or could the be improved by injecting a mock NetworkRouter as suggested here? Would it be helpful if I looked into creating such a mock?

@ajamaica
Copy link
Contributor

It will be supper helpful. My Problem with that is that solana RPC changes so ofter that this is a way to let me know is actually working. Its not ideal to use RPC all the time but Mocking is step on the right direction. Is not that hard since I provide the URLSession as a parameter for this exact purpose.

@ajamaica
Copy link
Contributor

We will use Aman for fixing this.

@ajamaica
Copy link
Contributor

There is now a way to mock the networking layer. But Aman may help with this too

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

2 participants