You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 24, 2020. It is now read-only.
Repository navigation
This repository was archived by the owner on Oct 24, 2020. It is now read-only.
Multiple junit tests fail, both from the IDE and from "mvn clean install". For instance:
java.lang.ArrayIndexOutOfBoundsException: 0
at com.blockcypher.utils.sign.SignUtils.getBytesFromBase58Key(SignUtils.java:97)
at com.blockcypher.utils.sign.SignUtils.sign(SignUtils.java:50)
at com.blockcypher.utils.sign.SignUtils.signWithBase58KeyWithPubKey(SignUtils.java:40)
at com.blockcypher.service.TransactionServiceTest.testNewTransactionFromInputs(TransactionServiceTest.java:75)
and
java.lang.ArrayIndexOutOfBoundsException: 0
at com.blockcypher.utils.sign.SignUtils.getBytesFromBase58Key(SignUtils.java:97)
at com.blockcypher.utils.sign.SignUtils.sign(SignUtils.java:50)
at com.blockcypher.utils.sign.SignUtils.signWithBase58KeyWithPubKey(SignUtils.java:40)
at com.blockcypher.service.MultiSigTest.testMultiSigWithWebsocketOnConfirmedTransaction(MultiSigTest.java:57)
and
junit.framework.AssertionFailedError
at junit.framework.Assert.fail(Assert.java:55)
at junit.framework.Assert.assertTrue(Assert.java:22)
at junit.framework.Assert.assertNotNull(Assert.java:256)
at junit.framework.Assert.assertNotNull(Assert.java:248)
at com.blockcypher.service.AddressServiceTest.testGetAddress(AddressServiceTest.java:51)
Hi spicylobe,
Did you put your own private key in:
public class AbstractServiceTest {
// In order to signWithBase58Key.. Of course do not store this is plain your java code... This is for test only!
protected static final String MY_PRIVATE_KEY = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
I wouldn't expect to have to modify any code just to get unit tests to run. Why not include a valid private key that was generated only for use in unit tests? It seems like you could then test many additional elements that require matching key pairs.
Activity
sebay commentedon Jan 20, 2016
Hi spicylobe,
Did you put your own private key in:
public class AbstractServiceTest {
spicylobe commentedon Jan 20, 2016
I wouldn't expect to have to modify any code just to get unit tests to run. Why not include a valid private key that was generated only for use in unit tests? It seems like you could then test many additional elements that require matching key pairs.
sebay commentedon Jan 20, 2016
Fair enough. Will try to do this.