Skip to content

s1na/graphqltestgen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

graphqltestgen

This is a tool to help generate tests for the Hive GraphQL simulator. The main function is to extend a chain of blocks by writing Go code for the new blocks. For this the genesis and a RLP-encoded list of files should be provided which can be found in the GraphQL test suite. E.g. if you run:

go run . --genesis genesis.json --chain chain.rlp

it will produce the new chain in newchain.rlp. Note that genesis.json and chain.rlp are the default values so those flags can be skipped.

It's possible to view the latest block of the chain with:

go run . --genesis genesis.json --chain chain.rlp head

Filling tests

When adding a new test case it's useful to run the query against a real node to fetch the response. This can be done with the fill command as follows:

go run . --genesis genesis.json --chain chain.rlp fill --request request.gql --bin /path/to/geth

The response will be written to response.gql.

About

Generate test chain for Hive GraphQL simulation

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages