From 5e4e27fed5b9b7c889e6e6e1805377b9eff31a3a Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Wed, 4 Apr 2018 11:35:58 +0900 Subject: Update dev-utils and subproviders tests to use ganache in-process provider --- packages/subproviders/test/utils/configs.ts | 5 +++++ packages/subproviders/test/utils/subprovider.ts | 18 ++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 packages/subproviders/test/utils/configs.ts create mode 100644 packages/subproviders/test/utils/subprovider.ts (limited to 'packages/subproviders/test/utils') diff --git a/packages/subproviders/test/utils/configs.ts b/packages/subproviders/test/utils/configs.ts new file mode 100644 index 000000000..341037e4f --- /dev/null +++ b/packages/subproviders/test/utils/configs.ts @@ -0,0 +1,5 @@ +export const configs = { + port: 8545, + networkId: 50, + mnemonic: 'concert load couple harbor equip island argue ramp clarify fence smart topic', +}; diff --git a/packages/subproviders/test/utils/subprovider.ts b/packages/subproviders/test/utils/subprovider.ts new file mode 100644 index 000000000..b1c459746 --- /dev/null +++ b/packages/subproviders/test/utils/subprovider.ts @@ -0,0 +1,18 @@ +import * as fs from 'fs'; + +import { GanacheSubprovider } from '../../src/subproviders/ganache'; +import { configs } from '../utils/configs'; + +const logger = { + log: (arg: any) => { + fs.appendFileSync('ganache.log', `${arg}\n`); + }, +}; + +export const subprovider = new GanacheSubprovider({ + logger, + verbose: false, + port: configs.port, + networkId: configs.networkId, + mnemonic: configs.mnemonic, +}); -- cgit v1.2.3 From 75a51af00603236e0b80fe04336494944a32739c Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Fri, 6 Apr 2018 15:04:17 +0900 Subject: Use provider over web3 in deployer, dev-utils and subprovider tests, rename subprovider to ganacheSubprovider in test util --- .../subproviders/test/utils/ganache_subprovider.ts | 18 ++++++++++++++++++ packages/subproviders/test/utils/subprovider.ts | 18 ------------------ 2 files changed, 18 insertions(+), 18 deletions(-) create mode 100644 packages/subproviders/test/utils/ganache_subprovider.ts delete mode 100644 packages/subproviders/test/utils/subprovider.ts (limited to 'packages/subproviders/test/utils') diff --git a/packages/subproviders/test/utils/ganache_subprovider.ts b/packages/subproviders/test/utils/ganache_subprovider.ts new file mode 100644 index 000000000..ac4a9325c --- /dev/null +++ b/packages/subproviders/test/utils/ganache_subprovider.ts @@ -0,0 +1,18 @@ +import * as fs from 'fs'; + +import { GanacheSubprovider } from '../../src/subproviders/ganache'; +import { configs } from '../utils/configs'; + +const logger = { + log: (arg: any) => { + fs.appendFileSync('ganache.log', `${arg}\n`); + }, +}; + +export const ganacheSubprovider = new GanacheSubprovider({ + logger, + verbose: false, + port: configs.port, + networkId: configs.networkId, + mnemonic: configs.mnemonic, +}); diff --git a/packages/subproviders/test/utils/subprovider.ts b/packages/subproviders/test/utils/subprovider.ts deleted file mode 100644 index b1c459746..000000000 --- a/packages/subproviders/test/utils/subprovider.ts +++ /dev/null @@ -1,18 +0,0 @@ -import * as fs from 'fs'; - -import { GanacheSubprovider } from '../../src/subproviders/ganache'; -import { configs } from '../utils/configs'; - -const logger = { - log: (arg: any) => { - fs.appendFileSync('ganache.log', `${arg}\n`); - }, -}; - -export const subprovider = new GanacheSubprovider({ - logger, - verbose: false, - port: configs.port, - networkId: configs.networkId, - mnemonic: configs.mnemonic, -}); -- cgit v1.2.3