solution: rename grpc target to method
This commit is contained in:
@@ -155,7 +155,7 @@ class NativeCallSpec extends Specification {
|
||||
.addAllItems([1, 2].collect { id ->
|
||||
return BlockchainOuterClass.NativeCallItem.newBuilder()
|
||||
.setId(id)
|
||||
.setTarget("eth_test")
|
||||
.setMethod("eth_test")
|
||||
.build()
|
||||
})
|
||||
.build()
|
||||
@@ -178,7 +178,7 @@ class NativeCallSpec extends Specification {
|
||||
.addAllItems([1, 2].collect { id ->
|
||||
return BlockchainOuterClass.NativeCallItem.newBuilder()
|
||||
.setId(id)
|
||||
.setTarget("eth_test")
|
||||
.setMethod("eth_test")
|
||||
.build()
|
||||
})
|
||||
.build()
|
||||
|
||||
@@ -54,7 +54,7 @@ class EthereumApiMock extends EthereumApi {
|
||||
|
||||
def nativeCall(BlockchainOuterClass.NativeCallRequest request, StreamObserver<BlockchainOuterClass.NativeCallReplyItem> responseObserver) {
|
||||
request.itemsList.forEach { req ->
|
||||
def resp = execute(req.id, req.target, objectMapper.readerFor(List).readValue(req.payload.toByteArray()))
|
||||
def resp = execute(req.id, req.method, objectMapper.readerFor(List).readValue(req.payload.toByteArray()))
|
||||
resp.subscribe {
|
||||
def proto = BlockchainOuterClass.NativeCallReplyItem.newBuilder()
|
||||
.setId(req.id)
|
||||
|
||||
@@ -58,7 +58,7 @@ class EthereumGrpcTransportSpec extends Specification {
|
||||
chain.number == Chain.ETHEREUM.id
|
||||
itemsCount == 1
|
||||
with(getItems(0)) {
|
||||
target == "eth_test"
|
||||
method == "eth_test"
|
||||
payload.toStringUtf8() == "[1]"
|
||||
}
|
||||
}
|
||||
@@ -106,11 +106,11 @@ class EthereumGrpcTransportSpec extends Specification {
|
||||
chain.number == Chain.ETHEREUM.id
|
||||
itemsCount == 2
|
||||
with(getItems(0)) {
|
||||
target == "eth_test"
|
||||
method == "eth_test"
|
||||
payload.toStringUtf8() == "[1]"
|
||||
}
|
||||
with(getItems(1)) {
|
||||
target == "eth_test2"
|
||||
method == "eth_test2"
|
||||
payload.toStringUtf8() == "[2,\"3\"]"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user