@@ -1105,31 +1105,31 @@ describe('Multiple datasources', () => {
11051105 process . env . CUBEJS_DB_DATABRICKS_URL = 'default1' ;
11061106 process . env . CUBEJS_DS_POSTGRES_DB_DATABRICKS_URL = 'postgres1' ;
11071107 process . env . CUBEJS_DS_WRONG_DB_DATABRICKS_URL = 'wrong1' ;
1108- expect ( getEnv ( 'databrickUrl ' , { dataSource : 'default' } ) ) . toEqual ( 'default1' ) ;
1109- expect ( getEnv ( 'databrickUrl ' , { dataSource : 'postgres' } ) ) . toEqual ( 'postgres1' ) ;
1110- expect ( ( ) => getEnv ( 'databrickUrl ' , { dataSource : 'wrong' } ) ) . toThrow (
1108+ expect ( getEnv ( 'databricksUrl ' , { dataSource : 'default' } ) ) . toEqual ( 'default1' ) ;
1109+ expect ( getEnv ( 'databricksUrl ' , { dataSource : 'postgres' } ) ) . toEqual ( 'postgres1' ) ;
1110+ expect ( ( ) => getEnv ( 'databricksUrl ' , { dataSource : 'wrong' } ) ) . toThrow (
11111111 'The wrong data source is missing in the declared CUBEJS_DATASOURCES.'
11121112 ) ;
11131113
11141114 process . env . CUBEJS_DB_DATABRICKS_URL = 'default2' ;
11151115 process . env . CUBEJS_DS_POSTGRES_DB_DATABRICKS_URL = 'postgres2' ;
11161116 process . env . CUBEJS_DS_WRONG_DB_DATABRICKS_URL = 'wrong2' ;
1117- expect ( getEnv ( 'databrickUrl ' , { dataSource : 'default' } ) ) . toEqual ( 'default2' ) ;
1118- expect ( getEnv ( 'databrickUrl ' , { dataSource : 'postgres' } ) ) . toEqual ( 'postgres2' ) ;
1119- expect ( ( ) => getEnv ( 'databrickUrl ' , { dataSource : 'wrong' } ) ) . toThrow (
1117+ expect ( getEnv ( 'databricksUrl ' , { dataSource : 'default' } ) ) . toEqual ( 'default2' ) ;
1118+ expect ( getEnv ( 'databricksUrl ' , { dataSource : 'postgres' } ) ) . toEqual ( 'postgres2' ) ;
1119+ expect ( ( ) => getEnv ( 'databricksUrl ' , { dataSource : 'wrong' } ) ) . toThrow (
11201120 'The wrong data source is missing in the declared CUBEJS_DATASOURCES.'
11211121 ) ;
11221122
11231123 delete process . env . CUBEJS_DB_DATABRICKS_URL ;
11241124 delete process . env . CUBEJS_DS_POSTGRES_DB_DATABRICKS_URL ;
11251125 delete process . env . CUBEJS_DS_WRONG_DB_DATABRICKS_URL ;
1126- expect ( ( ) => getEnv ( 'databrickUrl ' , { dataSource : 'default' } ) ) . toThrow (
1126+ expect ( ( ) => getEnv ( 'databricksUrl ' , { dataSource : 'default' } ) ) . toThrow (
11271127 'The CUBEJS_DB_DATABRICKS_URL is required and missing.'
11281128 ) ;
1129- expect ( ( ) => getEnv ( 'databrickUrl ' , { dataSource : 'postgres' } ) ) . toThrow (
1129+ expect ( ( ) => getEnv ( 'databricksUrl ' , { dataSource : 'postgres' } ) ) . toThrow (
11301130 'The CUBEJS_DS_POSTGRES_DB_DATABRICKS_URL is required and missing.'
11311131 ) ;
1132- expect ( ( ) => getEnv ( 'databrickUrl ' , { dataSource : 'wrong' } ) ) . toThrow (
1132+ expect ( ( ) => getEnv ( 'databricksUrl ' , { dataSource : 'wrong' } ) ) . toThrow (
11331133 'The wrong data source is missing in the declared CUBEJS_DATASOURCES.'
11341134 ) ;
11351135 } ) ;
@@ -1138,27 +1138,27 @@ describe('Multiple datasources', () => {
11381138 process . env . CUBEJS_DB_DATABRICKS_TOKEN = 'default1' ;
11391139 process . env . CUBEJS_DS_POSTGRES_DB_DATABRICKS_TOKEN = 'postgres1' ;
11401140 process . env . CUBEJS_DS_WRONG_DB_DATABRICKS_TOKEN = 'wrong1' ;
1141- expect ( getEnv ( 'databrickToken ' , { dataSource : 'default' } ) ) . toEqual ( 'default1' ) ;
1142- expect ( getEnv ( 'databrickToken ' , { dataSource : 'postgres' } ) ) . toEqual ( 'postgres1' ) ;
1143- expect ( ( ) => getEnv ( 'databrickToken ' , { dataSource : 'wrong' } ) ) . toThrow (
1141+ expect ( getEnv ( 'databricksToken ' , { dataSource : 'default' } ) ) . toEqual ( 'default1' ) ;
1142+ expect ( getEnv ( 'databricksToken ' , { dataSource : 'postgres' } ) ) . toEqual ( 'postgres1' ) ;
1143+ expect ( ( ) => getEnv ( 'databricksToken ' , { dataSource : 'wrong' } ) ) . toThrow (
11441144 'The wrong data source is missing in the declared CUBEJS_DATASOURCES.'
11451145 ) ;
11461146
11471147 process . env . CUBEJS_DB_DATABRICKS_TOKEN = 'default2' ;
11481148 process . env . CUBEJS_DS_POSTGRES_DB_DATABRICKS_TOKEN = 'postgres2' ;
11491149 process . env . CUBEJS_DS_WRONG_DB_DATABRICKS_TOKEN = 'wrong2' ;
1150- expect ( getEnv ( 'databrickToken ' , { dataSource : 'default' } ) ) . toEqual ( 'default2' ) ;
1151- expect ( getEnv ( 'databrickToken ' , { dataSource : 'postgres' } ) ) . toEqual ( 'postgres2' ) ;
1152- expect ( ( ) => getEnv ( 'databrickToken ' , { dataSource : 'wrong' } ) ) . toThrow (
1150+ expect ( getEnv ( 'databricksToken ' , { dataSource : 'default' } ) ) . toEqual ( 'default2' ) ;
1151+ expect ( getEnv ( 'databricksToken ' , { dataSource : 'postgres' } ) ) . toEqual ( 'postgres2' ) ;
1152+ expect ( ( ) => getEnv ( 'databricksToken ' , { dataSource : 'wrong' } ) ) . toThrow (
11531153 'The wrong data source is missing in the declared CUBEJS_DATASOURCES.'
11541154 ) ;
11551155
11561156 delete process . env . CUBEJS_DB_DATABRICKS_TOKEN ;
11571157 delete process . env . CUBEJS_DS_POSTGRES_DB_DATABRICKS_TOKEN ;
11581158 delete process . env . CUBEJS_DS_WRONG_DB_DATABRICKS_TOKEN ;
1159- expect ( getEnv ( 'databrickToken ' , { dataSource : 'default' } ) ) . toBeUndefined ( ) ;
1160- expect ( getEnv ( 'databrickToken ' , { dataSource : 'postgres' } ) ) . toBeUndefined ( ) ;
1161- expect ( ( ) => getEnv ( 'databrickToken ' , { dataSource : 'wrong' } ) ) . toThrow (
1159+ expect ( getEnv ( 'databricksToken ' , { dataSource : 'default' } ) ) . toBeUndefined ( ) ;
1160+ expect ( getEnv ( 'databricksToken ' , { dataSource : 'postgres' } ) ) . toBeUndefined ( ) ;
1161+ expect ( ( ) => getEnv ( 'databricksToken ' , { dataSource : 'wrong' } ) ) . toThrow (
11621162 'The wrong data source is missing in the declared CUBEJS_DATASOURCES.'
11631163 ) ;
11641164 } ) ;
0 commit comments