feat(integrations): add mock integration (#3505)

This commit is contained in:
Meier Lukas authored and GitHub committed 2025-07-04 09:49:18 +02:00
1 parent 350a531d32
commit 58d5b14c51
73 files changed
+1049 -156

No files matched your search

@@ -0,0 +1,23 @@
import type { IIndexerManagerIntegration } from "../../interfaces/indexer-manager/indexer-manager-integration";
import type { Indexer } from "../../types";
export class IndexerManagerMockService implements IIndexerManagerIntegration {
public async getIndexersAsync(): Promise<Indexer[]> {
return await Promise.resolve(
Array.from({ length: 10 }, (_, index) => IndexerManagerMockService.createIndexer(index + 1)),
);
}
public async testAllAsync(): Promise<void> {
await Promise.resolve();
}
private static createIndexer(index: number): Indexer {
return {
id: index,
name: `Mock Indexer ${index}`,
url: `https://mock-indexer-${index}.com`,
enabled: Math.random() > 0.2, // 80% chance of being enabled
status: Math.random() > 0.2, // 80% chance of being active
};
}
}