Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: handle updating operator api secret #3328

Open
wants to merge 26 commits into
base: 2893/multi-tenancy-v1
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 22 commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
614c713
feat(frontend): disallow api secret update and change tenant form to …
BlairCurrey Feb 28, 2025
84edc63
feat(backend): disallow tenant api secret update in admin api
BlairCurrey Feb 28, 2025
e881e3d
feat(backend): add service method to update secret, call on app start
BlairCurrey Mar 4, 2025
7b910d6
chore: rm log
BlairCurrey Mar 4, 2025
77681a3
fix(fronted): 'no any' lint error
BlairCurrey Mar 4, 2025
8eab244
fix(backend): error on failed secret update from config
BlairCurrey Mar 4, 2025
52fa4a7
fix(backend): wallet address resolver tests to be operator/non-operat…
BlairCurrey Mar 5, 2025
45f9eea
test(backend): update tenant tests to reflect operator cant update ap…
BlairCurrey Mar 5, 2025
b52208b
chore: fix format
BlairCurrey Mar 5, 2025
23277d7
chore: debug ci test failure (working locally)
BlairCurrey Mar 5, 2025
6a28574
chore: fix format
BlairCurrey Mar 5, 2025
bcba035
chore: debug ci test failure (working locally)
BlairCurrey Mar 5, 2025
7f568de
chore: debug ci test failure (working locally)
BlairCurrey Mar 5, 2025
e8d0854
chore: debug ci test failure (working locally)
BlairCurrey Mar 5, 2025
94dfa00
chore: debug ci test failure (working locally)
BlairCurrey Mar 5, 2025
dd2cd35
chore: debug ci test failure (working locally)
BlairCurrey Mar 5, 2025
eb56e82
chore: debug ci test failure (working locally)
BlairCurrey Mar 5, 2025
3b3ab7a
chore: debug ci test failure (working locally)
BlairCurrey Mar 5, 2025
c065eaa
chore: debug ci test failure (working locally)
BlairCurrey Mar 5, 2025
b9b424a
chore: debug ci test failure (working locally)
BlairCurrey Mar 5, 2025
5d451a4
chore: debug ci test failure (working locally)
BlairCurrey Mar 5, 2025
c7399be
fix: test side effects
BlairCurrey Mar 5, 2025
90bf84c
fix(backend): uncomment test
BlairCurrey Mar 6, 2025
eeae561
Update packages/backend/src/tenants/service.ts
BlairCurrey Mar 7, 2025
844e885
fix(backend): rm unushesd nock
BlairCurrey Mar 7, 2025
9f8f0c1
feat(backend): set cache on update operator secret method
BlairCurrey Mar 7, 2025
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
2 changes: 1 addition & 1 deletion packages/backend/src/accounting/psql/balance.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ describe('Balances', (): void => {

afterEach(async (): Promise<void> => {
jest.useRealTimers()
await truncateTables(knex)
await truncateTables(deps)
})

afterAll(async (): Promise<void> => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,18 @@ import { ForeignKeyViolationError } from 'objection'
import { createLedgerAccount } from '../../../tests/ledgerAccount'
import { ServiceDependencies } from '../service'
import { createAccount, getLiquidityAccount } from '.'
import { AppServices } from '../../../app'
import { IocContract } from '@adonisjs/fold'

describe('Ledger Account', (): void => {
let deps: IocContract<AppServices>
let serviceDeps: ServiceDependencies
let appContainer: TestContainer
let knex: Knex
let asset: Asset

beforeAll(async (): Promise<void> => {
const deps = initIocContainer({ ...Config, useTigerBeetle: false })
deps = initIocContainer({ ...Config, useTigerBeetle: false })
appContainer = await createTestApp(deps)
serviceDeps = {
logger: await deps.use('logger'),
Expand All @@ -40,7 +43,7 @@ describe('Ledger Account', (): void => {

afterEach(async (): Promise<void> => {
jest.useRealTimers()
await truncateTables(knex)
await truncateTables(deps)
})

afterAll(async (): Promise<void> => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,18 @@ import {
} from '.'
import { ServiceDependencies } from '../service'
import { TransferError } from '../../errors'
import { AppServices } from '../../../app'
import { IocContract } from '@adonisjs/fold'

describe('Ledger Transfer', (): void => {
let deps: IocContract<AppServices>
let serviceDeps: ServiceDependencies
let appContainer: TestContainer
let knex: Knex
let asset: Asset

beforeAll(async (): Promise<void> => {
const deps = initIocContainer({ ...Config, useTigerBeetle: false })
deps = initIocContainer({ ...Config, useTigerBeetle: false })
appContainer = await createTestApp(deps)
serviceDeps = {
logger: await deps.use('logger'),
Expand Down Expand Up @@ -65,7 +68,7 @@ describe('Ledger Transfer', (): void => {

afterEach(async (): Promise<void> => {
jest.useRealTimers()
await truncateTables(knex)
await truncateTables(deps)
})

afterAll(async (): Promise<void> => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ describe('Ledger Transfer Model', (): void => {

afterEach(async (): Promise<void> => {
jest.useRealTimers()
await truncateTables(knex)
await truncateTables(deps)
})

afterAll(async (): Promise<void> => {
Expand Down
2 changes: 1 addition & 1 deletion packages/backend/src/accounting/psql/service.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ describe('Psql Accounting Service', (): void => {

afterEach(async (): Promise<void> => {
jest.useRealTimers()
await truncateTables(knex)
await truncateTables(deps)
})

afterAll(async (): Promise<void> => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ describe('TigerBeetle Accounting Service', (): void => {
})

afterEach(async (): Promise<void> => {
await truncateTables(appContainer.knex)
await truncateTables(deps)
})

afterAll(async (): Promise<void> => {
Expand Down
2 changes: 1 addition & 1 deletion packages/backend/src/asset/model.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ describe('Models', (): void => {
})

afterEach(async (): Promise<void> => {
await truncateTables(appContainer.knex)
await truncateTables(deps)
})

afterAll(async (): Promise<void> => {
Expand Down
4 changes: 2 additions & 2 deletions packages/backend/src/asset/service.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ describe('Asset Service', (): void => {
})

afterEach(async (): Promise<void> => {
await truncateTables(appContainer.knex)
await truncateTables(deps)
})

afterAll(async (): Promise<void> => {
Expand Down Expand Up @@ -414,7 +414,7 @@ describe('Asset Service using Cache', (): void => {
})

afterEach(async (): Promise<void> => {
await truncateTables(appContainer.knex)
await truncateTables(deps)
})

afterAll(async (): Promise<void> => {
Expand Down
2 changes: 1 addition & 1 deletion packages/backend/src/fee/model.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ describe('Fee Model', (): void => {
})

afterEach(async (): Promise<void> => {
await truncateTables(appContainer.knex)
await truncateTables(deps)
})

afterAll(async (): Promise<void> => {
Expand Down
5 changes: 1 addition & 4 deletions packages/backend/src/fee/service.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { TestContainer, createTestApp } from '../tests/app'
import { initIocContainer } from '..'
import { Config } from '../config/app'
import { FeeService } from './service'
import { Knex } from 'knex'
import { truncateTables } from '../tests/tableManager'
import { createAsset } from '../tests/asset'
import { Asset } from '../asset/model'
Expand All @@ -18,14 +17,12 @@ import { Pagination, SortOrder } from '../shared/baseModel'
describe('Fee Service', (): void => {
let deps: IocContract<AppServices>
let appContainer: TestContainer
let knex: Knex
let feeService: FeeService
let asset: Asset

beforeAll(async (): Promise<void> => {
deps = await initIocContainer(Config)
appContainer = await createTestApp(deps)
knex = appContainer.knex
feeService = await deps.use('feeService')
})

Expand All @@ -34,7 +31,7 @@ describe('Fee Service', (): void => {
})

afterEach(async (): Promise<void> => {
await truncateTables(knex)
await truncateTables(deps)
})

afterAll(async (): Promise<void> => {
Expand Down
2 changes: 1 addition & 1 deletion packages/backend/src/graphql/middleware/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ describe('GraphQL Middleware', (): void => {
})

afterEach(async (): Promise<void> => {
await truncateTables(appContainer.knex)
await truncateTables(deps)
})

afterAll(async (): Promise<void> => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ describe('Accounting Transfer', (): void => {
})

afterEach(async (): Promise<void> => {
await truncateTables(appContainer.knex)
await truncateTables(deps)
})

afterAll(async (): Promise<void> => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ describe('TigerBeetle: Accounting Transfer', (): void => {
})

afterEach(async (): Promise<void> => {
await truncateTables(appContainer.knex)
await truncateTables(deps)
})

afterAll(async (): Promise<void> => {
Expand Down
2 changes: 1 addition & 1 deletion packages/backend/src/graphql/resolvers/asset.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ describe('Asset Resolvers', (): void => {
})

afterEach(async (): Promise<void> => {
await truncateTables(appContainer.knex)
await truncateTables(deps)
})

afterAll(async (): Promise<void> => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ describe('Auto Peering Resolvers', (): void => {
})

afterEach(async (): Promise<void> => {
await truncateTables(appContainer.knex)
await truncateTables(deps)
})

afterAll(async (): Promise<void> => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ describe('Payment', (): void => {
})

afterEach(async (): Promise<void> => {
await truncateTables(appContainer.knex)
await truncateTables(deps)
})

afterAll(async (): Promise<void> => {
Expand Down
2 changes: 1 addition & 1 deletion packages/backend/src/graphql/resolvers/fee.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ describe('Fee Resolvers', () => {
})

afterEach(async () => {
await truncateTables(appContainer.knex)
await truncateTables(deps)
})

afterAll(async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ describe('Incoming Payment Resolver', (): void => {
})

afterAll(async (): Promise<void> => {
await truncateTables(appContainer.knex)
await truncateTables(deps)
await appContainer.apolloClient.stop()
await appContainer.shutdown()
})
Expand Down
2 changes: 1 addition & 1 deletion packages/backend/src/graphql/resolvers/liquidity.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ describe('Liquidity Resolvers', (): void => {
})

afterAll(async (): Promise<void> => {
await truncateTables(knex)
await truncateTables(deps)
await appContainer.apolloClient.stop()
await appContainer.shutdown()
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ describe('OutgoingPayment Resolvers', (): void => {

afterEach(async (): Promise<void> => {
jest.restoreAllMocks()
await truncateTables(appContainer.knex)
await truncateTables(deps)
})

afterAll(async (): Promise<void> => {
Expand Down
2 changes: 1 addition & 1 deletion packages/backend/src/graphql/resolvers/peer.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ describe('Peer Resolvers', (): void => {
})

afterEach(async (): Promise<void> => {
await truncateTables(appContainer.knex)
await truncateTables(deps)
})

afterAll(async (): Promise<void> => {
Expand Down
2 changes: 1 addition & 1 deletion packages/backend/src/graphql/resolvers/quote.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ describe('Quote Resolvers', (): void => {

afterEach(async (): Promise<void> => {
jest.restoreAllMocks()
await truncateTables(appContainer.knex)
await truncateTables(deps)
})

afterAll(async (): Promise<void> => {
Expand Down
Loading
Loading