HomePhabricator

[build-bot] Fix database test when an extension is not present on the database…

Description

[build-bot] Fix database test when an extension is not present on the database file

Summary:
In some versions of Python, a different database backend may be selected.
The backend selected may or may not append an extension to the database file.

This patch fixes the implementation and test to work whether a file extension is present
or not. It also moves the test database to a more predictable location and does not
clean it up after the test is run to allow for easier post-test debugging.

Test Plan:

Running `pytest` in either `contrib/buildbot` or `contrib/buildbot/test` produces
`contrib/buildbot/test/test_output/database`(with optional `.db` extension).
Running `pytest` repeatedly, the tests still pass.

Reviewers: #bitcoin_abc, Fabien

Reviewed By: #bitcoin_abc, Fabien

Subscribers: Fabien

Differential Revision: https://reviews.bitcoinabc.org/D8060

Details

Provenance
jasonbcoxAuthored on Oct 22 2020, 21:19
abc-botPushed on Oct 22 2020, 21:25
Reviewer
Restricted Project
Differential Revision
D8060: [build-bot] Fix database test when an extension is not present on the database file
Parents
rABC57e85e779508: [BUILDBOT] Remove unecessary imports of the phabricator library
Branches
Unknown
Tags
Unknown