Skip to content

Commit

Permalink
Fix failing tests in github
Browse files Browse the repository at this point in the history
  • Loading branch information
darunrs committed Oct 5, 2023
1 parent 1e1f086 commit 073bd18
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions runner/src/indexer/indexer.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@ CREATE TABLE
});

test('GetTables works for a variety of input schemas', async () => {
const indexer = new Indexer('mainnet');
const indexer = new Indexer('mainnet', { redisClient: transparentRedis });

const simpleSchemaTables = indexer.getTableNames(SIMPLE_SCHEMA);
expect(simpleSchemaTables).toStrictEqual(['posts']);
Expand Down Expand Up @@ -590,7 +590,7 @@ CREATE TABLE
});

test('SanitizeTableName works properly on many test cases', async () => {
const indexer = new Indexer('mainnet');
const indexer = new Indexer('mainnet', { redisClient: transparentRedis });

expect(indexer.sanitizeTableName('table_name')).toStrictEqual('TableName');
expect(indexer.sanitizeTableName('tablename')).toStrictEqual('Tablename'); // name is not capitalized
Expand All @@ -605,7 +605,7 @@ CREATE TABLE
});

test('indexer fails to build context.db due to collision on sanitized table names', async () => {
const indexer = new Indexer('mainnet');
const indexer = new Indexer('mainnet', { redisClient: transparentRedis });

const schemaWithDuplicateSanitizedTableNames = `CREATE TABLE
"test table" (
Expand Down
2 changes: 1 addition & 1 deletion runner/src/indexer/indexer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ export default class Indexer {
provisioner: new Provisioner(),
DmlHandler,
parser: new Parser(),
redisClient: new RedisClient(),
redisClient: deps?.redisClient ?? new RedisClient(),
...deps,
};
}
Expand Down

0 comments on commit 073bd18

Please sign in to comment.