From 129ed56a05391fd638d3133601175085e33495bf Mon Sep 17 00:00:00 2001 From: Daniel Werner Date: Thu, 12 Dec 2024 08:39:53 -0800 Subject: [PATCH] common: skip tests that make rpc calls --- .../src/allocations/__tests__/tap-pagination.test.ts | 4 +++- .../src/allocations/__tests__/validate-queries.test.ts | 5 ++++- .../src/indexer-management/__tests__/allocations.test.ts | 6 ++++-- 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/packages/indexer-common/src/allocations/__tests__/tap-pagination.test.ts b/packages/indexer-common/src/allocations/__tests__/tap-pagination.test.ts index abfeee144..b7552fd58 100644 --- a/packages/indexer-common/src/allocations/__tests__/tap-pagination.test.ts +++ b/packages/indexer-common/src/allocations/__tests__/tap-pagination.test.ts @@ -175,7 +175,9 @@ const setup = () => { } } -describe('TAP Pagination', () => { +// Skipped because it hits real RPC providers and uses up the API key. +// Skipping it works around this issue for now but we should turn it back on once we have a better solution. +describe.skip('TAP Pagination', () => { beforeAll(setup, timeout) test( 'test `getAllocationsfromAllocationIds` pagination', diff --git a/packages/indexer-common/src/allocations/__tests__/validate-queries.test.ts b/packages/indexer-common/src/allocations/__tests__/validate-queries.test.ts index b6836867f..dbfec4b11 100644 --- a/packages/indexer-common/src/allocations/__tests__/validate-queries.test.ts +++ b/packages/indexer-common/src/allocations/__tests__/validate-queries.test.ts @@ -57,7 +57,10 @@ const setup = async () => { } jest.spyOn(TapCollector.prototype, 'startRAVProcessing').mockImplementation() -describe('Validate TAP queries', () => { + +// Skipped because this hits real RPC endpoints. +// This test should be re-enabled when we have a test environment that this can hit instead. +describe.skip('Validate TAP queries', () => { beforeAll(setup, timeout) test( diff --git a/packages/indexer-common/src/indexer-management/__tests__/allocations.test.ts b/packages/indexer-common/src/indexer-management/__tests__/allocations.test.ts index 36867375b..5c3a0ad28 100644 --- a/packages/indexer-common/src/indexer-management/__tests__/allocations.test.ts +++ b/packages/indexer-common/src/indexer-management/__tests__/allocations.test.ts @@ -97,7 +97,9 @@ const teardownAll = async () => { await sequelize.drop({}) } -describe('Allocation Manager', () => { +// These tests are skipped because they hit real RPC providers and use up the API key. +// Skipping them works around this issue for now but we should turn them back on once we have a better solution. +describe.skip('Allocation Manager', () => { beforeAll(setup) beforeEach(setupEach) afterEach(teardownEach) @@ -126,7 +128,7 @@ describe('Allocation Manager', () => { // @ts-ignore: Mocking the Action type for this test const actions = [queuedAllocateAction, unallocateAction, reallocateAction] as Action[] - test.skip('stakeUsageSummary() correctly calculates token balances for array of actions', async () => { + test('stakeUsageSummary() correctly calculates token balances for array of actions', async () => { const balances = await Promise.all( actions.map((action: Action) => allocationManager.stakeUsageSummary(action)), )