Page MenuHomePhabricator

Merge #13061: Make tests pass after 2020
ClosedPublic

Authored by jasonbcox on Wed, Mar 25, 20:37.

Details

Summary

3ee4be1 Make tests pass after 2020 (Bernhard M. Wiedemann)

Pull request description:

Make tests pass after 2020
and also test that 64 bit integers are properly handled

Without this patch, the failure was
```
unknown location(0): fatal error: in "rpc_tests/rpc_ban": std::runtime_error: JSON value is not an object as expected
test/rpc_tests.cpp(260): last checkpoint
```

I found this when testing reproducible builds for openSUSE Linux packages, building 15 years from now (this is the expected lifespan of today's software)

There is 1 other issue in ./src/qt/test/paymentservertests.cpp that fails to verify a cert that expires in 2022 after 10y.

```
QWARN  : PaymentServerTests::paymentServerTests() PaymentRequestPlus::getMerchant: Payment request: certificate expired or not yet active:  QSslCertificate("3", "01", "Ipbt+DxK8RDQd25/5ueXqw==", (), ("Payment Request Test Merchant"), QMap(), QDateTime(2012-12-10 16:37:24.000 UTC Qt::TimeSpec(UTC)), QDateTime(2022-12-08 16:37:24.000 UTC Qt::TimeSpec(UTC)))
FAIL!  : PaymentServerTests::paymentServerTests() Compared values are not the same
```

Tree-SHA512: d6c49879b6abbddbecc1168ac24c2d4f4ee9949b615607b3e6ba350c415136017f32cd112708791b063a2f2dc1b12f295f4ee55a346bd2128aa6480088d8db48

Backport of Core PR13061

Test Plan
faketime '2022-01-01' ninja check-bitcoin-rpc_tests

Fails pre-patch, passes post-patch

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

jasonbcox created this revision.Wed, Mar 25, 20:37
Herald added a reviewer: Restricted Project. · View Herald TranscriptWed, Mar 25, 20:37
teamcity edited the summary of this revision. (Show Details)Wed, Mar 25, 20:38

[Bot Message]
One or more PR numbers were detected in the summary.
Links to those PRs have been inserted into the summary for reference.

Fabien accepted this revision.Wed, Mar 25, 20:54
Fabien added a subscriber: Fabien.
Fabien added inline comments.
src/test/rpc_tests.cpp
408 ↗(On Diff #17181)

Please add a comment with the date (2283-12-8 19:33:20)

This revision is now accepted and ready to land.Wed, Mar 25, 20:54
jasonbcox updated this revision to Diff 17182.Wed, Mar 25, 20:58

Add comment

This revision was automatically updated to reflect the committed changes.