Skip to content

Commit

Permalink
feat(env)!: rename some env variables
Browse files Browse the repository at this point in the history
  • Loading branch information
golobitch committed May 12, 2024
1 parent 277c85d commit a831a56
Show file tree
Hide file tree
Showing 65 changed files with 595 additions and 291 deletions.
3 changes: 2 additions & 1 deletion packages/backend/src/accounting/psql/balance.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ describe('Balances', (): void => {
let asset: Asset

beforeAll(async (): Promise<void> => {
const deps = initIocContainer({ ...Config, useTigerbeetle: false })
Config.useTigerbeetle = false
const deps = initIocContainer()
appContainer = await createTestApp(deps)
serviceDeps = {
logger: await deps.use('logger'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ describe('Ledger Account', (): void => {
let asset: Asset

beforeAll(async (): Promise<void> => {
const deps = initIocContainer({ ...Config, useTigerbeetle: false })
Config.useTigerbeetle = false
const deps = initIocContainer()
appContainer = await createTestApp(deps)
serviceDeps = {
logger: await deps.use('logger'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ describe('Ledger Transfer', (): void => {
let asset: Asset

beforeAll(async (): Promise<void> => {
const deps = initIocContainer({ ...Config, useTigerbeetle: false })
Config.useTigerbeetle = false
const deps = initIocContainer()
appContainer = await createTestApp(deps)
serviceDeps = {
logger: await deps.use('logger'),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ describe('Ledger Transfer Model', (): void => {
let asset: Asset

beforeAll(async (): Promise<void> => {
const deps = initIocContainer({ ...Config, useTigerbeetle: false })
Config.useTigerbeetle = false
const deps = initIocContainer()
appContainer = await createTestApp(deps)
knex = appContainer.knex
})
Expand Down
3 changes: 2 additions & 1 deletion packages/backend/src/accounting/psql/service.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ describe('Psql Accounting Service', (): void => {
let asset: Asset

beforeAll(async (): Promise<void> => {
deps = initIocContainer({ ...Config, useTigerbeetle: false })
Config.useTigerbeetle = false
const deps = initIocContainer()
appContainer = await createTestApp(deps)
knex = appContainer.knex
accountingService = await deps.use('accountingService')
Expand Down
8 changes: 3 additions & 5 deletions packages/backend/src/accounting/tigerbeetle/service.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,9 @@ describe('Tigerbeetle Accounting Service', (): void => {
const tigerbeetlePort = (global as unknown as { tigerbeetlePort: number })
.tigerbeetlePort

deps = initIocContainer({
...Config,
tigerbeetleReplicaAddresses: [tigerbeetlePort.toString()],
useTigerbeetle: true
})
Config.useTigerbeetle = true
Config.tigerbeetleReplicaAddresses = [tigerbeetlePort.toString()]
deps = initIocContainer()
appContainer = await createTestApp(deps)
accountingService = await deps.use('accountingService')
accountFactory = new AccountFactory(accountingService, newLedger)
Expand Down
3 changes: 1 addition & 2 deletions packages/backend/src/asset/model.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import { Knex } from 'knex'

import { AssetService } from './service'
import { Config } from '../config/app'
import { createTestApp, TestContainer } from '../tests/app'
import { IocContract } from '@adonisjs/fold'
import { initIocContainer } from '../'
Expand All @@ -18,7 +17,7 @@ describe('Models', (): void => {
let knex: Knex

beforeAll(async (): Promise<void> => {
deps = initIocContainer(Config)
deps = initIocContainer()
appContainer = await createTestApp(deps)
assetService = await deps.use('assetService')
knex = await deps.use('knex')
Expand Down
3 changes: 1 addition & 2 deletions packages/backend/src/asset/service.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { getPageTests } from '../shared/baseModel.test'
import { createTestApp, TestContainer } from '../tests/app'
import { createAsset, randomAsset } from '../tests/asset'
import { truncateTables } from '../tests/tableManager'
import { Config } from '../config/app'
import { IocContract } from '@adonisjs/fold'
import { initIocContainer } from '../'
import { AppServices } from '../app'
Expand All @@ -22,7 +21,7 @@ describe('Asset Service', (): void => {
let assetService: AssetService

beforeAll(async (): Promise<void> => {
deps = initIocContainer(Config)
deps = initIocContainer()
appContainer = await createTestApp(deps)
assetService = await deps.use('assetService')
})
Expand Down
Loading

0 comments on commit a831a56

Please sign in to comment.