From 05e19afd3227b582726d2e4bb00dc96bdd907091 Mon Sep 17 00:00:00 2001 From: tolga-tom-nook Date: Mon, 25 May 2026 10:34:52 +0000 Subject: [PATCH] test: keep legacy config aliases on Bitgesell services --- package-lock.json | 8 ++--- test/config/index.js | 61 ++++++++++++++++++++++++--------------- test/config_alias_test.js | 19 ++++++++++++ 3 files changed, 61 insertions(+), 27 deletions(-) create mode 100644 test/config_alias_test.js diff --git a/package-lock.json b/package-lock.json index 33aacb9..fa4efc5 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { - "name": "bitcoin-core", - "version": "4.1.0", + "name": "bitgesell-core", + "version": "0.1.0", "lockfileVersion": 2, "requires": true, "packages": { "": { - "name": "bitcoin-core", - "version": "4.1.0", + "name": "bitgesell-core", + "version": "0.1.0", "license": "MIT", "dependencies": { "@uphold/request-logger": "^2.0.0", diff --git a/test/config/index.js b/test/config/index.js index 3a40896..1b3a15f 100644 --- a/test/config/index.js +++ b/test/config/index.js @@ -7,28 +7,43 @@ * Export services config. */ +const bitgesell = { + host: 'localhost', + password: 'localuser', + port: 8334, + username: 'foo' +}; + +const bitgesellMultiWallet = { + host: 'localhost', + password: 'bar', + port: 18453, + username: 'foo' +}; + +const bitgesellSsl = { + host: 'localhost', + password: 'bar', + port: 18463, + username: 'foo' +}; + +const bitgesellUsernameOnly = { + host: 'localhost', + port: 18473, + username: 'foo' +}; + +// Keep legacy bitcoin-* names wired to the Bitgesell config while the upstream +// bitcoin-core test suite is being migrated file-by-file. module.exports = { - bitgesell: { - host: 'localhost', - password: 'localuser', - port: 8334, - username: 'foo' - }, - bitgesellMultiWallet: { - host: 'localhost', - password: 'bar', - port: 18453, - username: 'foo' - }, - bitgesellSsl: { - host: 'localhost', - password: 'bar', - port: 18463, - username: 'foo' - }, - bitgesellUsernameOnly: { - host: 'localhost', - port: 18473, - username: 'foo' - } + // Backwards-compatible aliases used by existing tests inherited from bitcoin-core. + bitcoin: bitgesell, + bitcoinMultiWallet: bitgesellMultiWallet, + bitcoinSsl: bitgesellSsl, + bitcoinUsernameOnly: bitgesellUsernameOnly, + bitgesell, + bitgesellMultiWallet, + bitgesellSsl, + bitgesellUsernameOnly }; diff --git a/test/config_alias_test.js b/test/config_alias_test.js new file mode 100644 index 0000000..2eaec66 --- /dev/null +++ b/test/config_alias_test.js @@ -0,0 +1,19 @@ +/** + * Module dependencies. + */ + +const config = require('./config'); +const should = require('should'); + +/** + * Test config aliases. + */ + +describe('Configuration aliases', () => { + it('should point legacy bitcoin aliases at Bitgesell service config', () => { + should(config.bitcoin).equal(config.bitgesell); + should(config.bitcoinMultiWallet).equal(config.bitgesellMultiWallet); + should(config.bitcoinSsl).equal(config.bitgesellSsl); + should(config.bitcoinUsernameOnly).equal(config.bitgesellUsernameOnly); + }); +});