Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
stwiname committed Aug 23, 2024
1 parent eca5485 commit bcf7ad5
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions packages/node/src/indexer/api.service.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,14 @@ describe('ApiService', () => {
},
{
provide: NodeConfig,
useFactory: () => ({}),
useFactory: () =>
new NodeConfig(
{
kyveEndpoint: 'https://api-us-1.kyve.network',
kyveStorageUrl: 'https://arweave.net',
} as any,
true,
),
},
EventEmitter2,
{
Expand All @@ -77,17 +84,12 @@ describe('ApiService', () => {
NodeConfig,
],
},
NodeConfig,
],
imports: [EventEmitterModule.forRoot()],
}).compile();
app = module.createNestApplication();
await app.init();
apiService = app.get(ApiService);
(apiService as any).nodeConfig._config.kyveEndpoint =
'https://api-us-1.kyve.network';
(apiService as any).nodeConfig._config.kyveStorageUrl =
'https://arweave.net';
};

const ENDPOINT = 'https://rpc-juno.itastakers.com/';
Expand All @@ -97,6 +99,7 @@ describe('ApiService', () => {
beforeAll(async () => {
tmpPath = await makeTempDir();
});

it('Falls back on rpc if kyve fails', async () => {
const endpoint = 'https://rpc.mainnet.archway.io:443';
const chainId = 'archway-1';
Expand Down

0 comments on commit bcf7ad5

Please sign in to comment.