Skip to content

Commit ce3ec56

Browse files
committed
Fix clickhouseUseCollation tests to check for default value
1 parent a2616fe commit ce3ec56

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

packages/cubejs-backend-shared/test/db_env_multi.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1561,8 +1561,8 @@ describe('Multiple datasources', () => {
15611561
delete process.env.CUBEJS_DB_CLICKHOUSE_SORT_COLLATION;
15621562
delete process.env.CUBEJS_DS_POSTGRES_DB_CLICKHOUSE_SORT_COLLATION;
15631563
delete process.env.CUBEJS_DS_WRONG_DB_CLICKHOUSE_SORT_COLLATION;
1564-
expect(getEnv('clickhouseSortCollation', { dataSource: 'default' })).toBeUndefined();
1565-
expect(getEnv('clickhouseSortCollation', { dataSource: 'postgres' })).toBeUndefined();
1564+
expect(getEnv('clickhouseSortCollation', { dataSource: 'default' })).toEqual('en');
1565+
expect(getEnv('clickhouseSortCollation', { dataSource: 'postgres' })).toEqual('en');
15661566
expect(() => getEnv('clickhouseSortCollation', { dataSource: 'wrong' })).toThrow(
15671567
'The wrong data source is missing in the declared CUBEJS_DATASOURCES.'
15681568
);

packages/cubejs-backend-shared/test/db_env_single.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -987,9 +987,9 @@ describe('Single datasources', () => {
987987
expect(getEnv('clickhouseSortCollation', { dataSource: 'wrong' })).toEqual('default2');
988988

989989
delete process.env.CUBEJS_DB_CLICKHOUSE_SORT_COLLATION;
990-
expect(getEnv('clickhouseSortCollation', { dataSource: 'default' })).toBeUndefined();
991-
expect(getEnv('clickhouseSortCollation', { dataSource: 'postgres' })).toBeUndefined();
992-
expect(getEnv('clickhouseSortCollation', { dataSource: 'wrong' })).toBeUndefined();
990+
expect(getEnv('clickhouseSortCollation', { dataSource: 'default' })).toEqual('en');
991+
expect(getEnv('clickhouseSortCollation', { dataSource: 'postgres' })).toEqual('en');
992+
expect(getEnv('clickhouseSortCollation', { dataSource: 'wrong' })).toEqual('en');
993993
});
994994

995995
test('getEnv("clickhouseUseCollation")', () => {

0 commit comments

Comments
 (0)