Browse Source

rpc/test: restore txindexer after setting null

pull/412/head
Ethan Buchman 7 years ago
parent
commit
16bffdf7ab
1 changed files with 5 additions and 2 deletions
  1. +5
    -2
      rpc/test/client_test.go

+ 5
- 2
rpc/test/client_test.go View File

@ -156,15 +156,18 @@ func testBroadcastTxCommit(t *testing.T, client rpc.HTTPClient) {
func TestURITx(t *testing.T) {
testTx(t, GetURIClient(), true)
core.SetTxIndexer(&indexer.Null{})
testTx(t, GetJSONClient(), false)
core.SetTxIndexer(node.ConsensusState().GetState().TxIndexer)
}
func TestJSONTx(t *testing.T) {
testTx(t, GetJSONClient(), true)
}
func TestZZZZTxNoIndexer(t *testing.T) {
core.SetTxIndexer(&indexer.Null{})
testTx(t, GetJSONClient(), false)
core.SetTxIndexer(node.ConsensusState().GetState().TxIndexer)
}
func testTx(t *testing.T, client rpc.HTTPClient, withIndexer bool) {


Loading…
Cancel
Save