|
14 | 14 | * limitations under the License. |
15 | 15 | */ |
16 | 16 | import { map } from 'rxjs/operators'; |
17 | | -import { Addresses, BootstrapService, BootstrapUtils, Preset, StartParams } from 'symbol-bootstrap'; |
| 17 | +import { Addresses, BootstrapService, BootstrapUtils, ConfigLoader, StartParams } from 'symbol-bootstrap'; |
18 | 18 | import { IListener, RepositoryFactory, RepositoryFactoryHttp } from '../../src/infrastructure'; |
19 | 19 | import { UInt64 } from '../../src/model'; |
20 | 20 | import { Account } from '../../src/model/account'; |
@@ -48,26 +48,10 @@ export class IntegrationTestHelper { |
48 | 48 | public epochAdjustment: number; |
49 | 49 | public bootstrapAddresses: Addresses; |
50 | 50 |
|
51 | | - private async startBootstrapServer(): Promise<{ accounts: string[]; apiUrl: string; addresses: Addresses }> { |
52 | | - this.config = { |
53 | | - report: false, |
54 | | - preset: Preset.bootstrap, |
55 | | - reset: this.startEachTime, |
56 | | - customPreset: './e2e/e2e-preset.yml', |
57 | | - timeout: 60000 * 3, |
58 | | - target: 'target/bootstrap-test', |
59 | | - detached: false, |
60 | | - user: 'current', |
61 | | - }; |
62 | | - |
63 | | - console.log('Starting bootstrap server'); |
64 | | - const configResult = await this.service.start({ ...this.config, detached: true }); |
65 | | - return this.toAccounts(configResult.addresses); |
66 | | - } |
67 | 51 | private async loadBootstrap(): Promise<{ accounts: string[]; apiUrl: string; addresses: Addresses }> { |
68 | | - const target = process.env.REST_DEV || true ? '../catapult-rest/rest/target' : 'target/bootstrap-test'; |
| 52 | + const target = process.env.REST_DEV ? '../catapult-rest/rest/target' : 'target/bootstrap-test'; |
69 | 53 | console.log('Loading bootstrap server'); |
70 | | - const addresses = BootstrapUtils.loadExistingAddresses(target); |
| 54 | + const addresses = new ConfigLoader().loadExistingAddresses(target, false); |
71 | 55 | return this.toAccounts(addresses); |
72 | 56 | } |
73 | 57 |
|
|
0 commit comments