problem: manual integration tests don't work
This commit is contained in:
committed by
GitHub
parent
1b3e35eb1e
commit
aeea27bb70
@@ -17,19 +17,13 @@ dependencies {
|
||||
implementation "com.fasterxml.jackson.core:jackson-databind:2.9.8"
|
||||
implementation "io.grpc:grpc-netty:1.46.0"
|
||||
implementation "org.bouncycastle:bcprov-jdk15on:1.61"
|
||||
implementation("io.emeraldpay:emerald-api:0.11.1") {
|
||||
implementation("io.emeraldpay:emerald-api:0.12-alpha.1") {
|
||||
exclude group: 'com.salesforce.servicelibs', module: 'reactor-grpc'
|
||||
}
|
||||
|
||||
testImplementation "org.spockframework:spock-core:2.0-M3-groovy-3.0"
|
||||
}
|
||||
|
||||
configurations.all {
|
||||
resolutionStrategy.dependencySubstitution {
|
||||
substitute module("io.emeraldpay:emerald-api") using project(":api") because "we work with the unreleased development version"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
test {
|
||||
systemProperty "trialMode", project.getProperty("dshackleTrialMode")
|
||||
|
||||
@@ -144,16 +144,23 @@ class StandardCallsSpec extends Specification {
|
||||
def sep = "/".bytes
|
||||
def digest = MessageDigest.getInstance("SHA-256")
|
||||
def messageHash = digest.digest(act.payload.toByteArray())
|
||||
sig.update(Bytes.concat("DSHACKLESIG".bytes, sep, Longs.toByteArray(10), sep, messageHash))
|
||||
def sigmessage = Bytes.concat("DSHACKLESIG".bytes,
|
||||
sep,
|
||||
10L.toString().bytes,
|
||||
sep,
|
||||
act.signature.upstreamId.bytes,
|
||||
sep,
|
||||
Hex.encodeHexString(messageHash).bytes)
|
||||
sig.update(sigmessage)
|
||||
then:
|
||||
(new String(act.payload.toByteArray())) == "\"0x100001\""
|
||||
sig.verify(act.signature.sig.toByteArray())
|
||||
sig.verify(act.signature.signature.toByteArray())
|
||||
}
|
||||
|
||||
def "check response signature without nonce"() {
|
||||
when:
|
||||
def act = client_proto.executeNative("eth_blockNumber", [], 0L)
|
||||
then:
|
||||
act.signature.sig.isEmpty()
|
||||
act.signature.signature.isEmpty()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user