paritytech / zombienet

A cli tool to easily spawn ephemeral Polkadot/Substrate networks and perform tests against them.
https://paritytech.github.io/zombienet/
GNU General Public License v3.0
157 stars 92 forks source link

Can we test solochain with zombienet? #1823

Closed ashi20192020 closed 1 week ago

ashi20192020 commented 3 months ago

I am working on a live solo chain. I have to test a scenario where I want to hit HTTP API through off chain-worker. Unfortunately it's not possible to test in mock environment.

We can take an example of official Substrate Offchain example where we are hitting price api. I want to test whether we are able to hit price api through off chain.

I just wanted to check if it is possible through zombienet.

pepoviola commented 2 months ago

Hi @ashi20192020, sorry about the delay. That kind of scenarios are supported with zombienet. You can spawn a new (ephemeral) network and use our custom-js assertion to run any js code and assert on the output. Check https://paritytech.github.io/zombienet/cli/test-dsl-definition-spec.html and there are a few examples here.

Thanks!

ashi20192020 commented 2 months ago

@pepoviola Thanks for your answer. Is there any way to start solo chain node using zombienet?

pepoviola commented 2 months ago

@pepoviola Thanks for your answer. Is there any way to start solo chain node using zombienet?

Hi @ashi20192020, sorry about the delay. Yes, you can start a solochain defined as relaychain only in the network definition.

ping me if you need help with this.

Thx!

pepoviola commented 1 week ago

Hi @ashi20192020, closing here. Please re-open if needed. Thx!!