Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

61 changes: 38 additions & 23 deletions test/config/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
};
19 changes: 19 additions & 0 deletions test/config_alias_test.js
Original file line number Diff line number Diff line change
@@ -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);
});
});