Skip to content
This repository has been archived by the owner on Apr 3, 2019. It is now read-only.

npm test is broken #40

Open
gabmontes opened this issue Jun 8, 2017 · 3 comments
Open

npm test is broken #40

gabmontes opened this issue Jun 8, 2017 · 3 comments

Comments

@gabmontes
Copy link

Running npm test on HEAD of master branch (b086fc6) is currently failing for "PaymentProtocol #x509+sha256Verify should verify a real PaymentRequest without Root Cert" test case.

As per Travis logs at March 15 on that same commit, the test was passing: https://travis-ci.org/bitpay/bitcore-payment-protocol/jobs/211400035#L333

Is it possible that an updated dependency broke the test?

@Alex-Werner
Copy link

It's because the test will use the Coinbase case.
In it you will have these dates :

{ notBefore: { type: 'utcTime', value: 1429564906000 },
notAfter: { type: 'utcTime', value: 1493147460000 } }

As we are >1493147460000, we therefore not comply.

Therefore validateCertTime will return false (as cBefore>now isn't valid anymore.
Because validateCertTime is false, validityVerified is false, and we expect validityVerified && issuerVerified && sigVerified; to be return.

Therefore, final value is false. And test is failing.

@gabmontes
Copy link
Author

@Alex-Werner thanks for the explanation!

@Alex-Werner
Copy link

Alex-Werner commented Jul 5, 2017

My pleasure.
The one to fix :

https://github.com/bitpay/bitcore-payment-protocol/blob/master/test/samplerequest.js#L347

I'm interested if someone can tell me how I can help with that ^^'

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants