Skip to content

Commit 1ecc83b

Browse files
committed
fix
1 parent 7cb73c1 commit 1ecc83b

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

packages/cubejs-testing-drivers/fixtures/bigquery.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,8 @@
178178
"querying ECommerce: total quantity, avg discount, total sales, total profit by product + order + total -- rounding in athena",
179179
"querying ECommerce: total sales, total profit by month + order (date) + total -- doesn't work with the BigQuery",
180180
"querying ECommerce: total quantity, avg discount, total sales, total profit by product + order + total -- noisy test",
181+
"querying custom granularities (with preaggregation) ECommerce: totalQuantity by half_year + no dimension",
182+
"querying custom granularities (with preaggregation) ECommerce: totalQuantity by half_year + dimension",
181183
"pre-aggregations Customers: running total without time dimension",
182184
"querying BigECommerce: null boolean",
183185
"querying BigECommerce: rolling count_distinct_approx window by 2 day",

packages/cubejs-testing-drivers/fixtures/postgres.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,8 @@
167167
"querying Products: dimensions -- doesn't work wo ordering",
168168
"querying ECommerce: total quantity, avg discount, total sales, total profit by product + order + total -- rounding in athena",
169169
"querying ECommerce: total quantity, avg discount, total sales, total profit by product + order + total -- noisy test",
170+
"querying custom granularities (with preaggregation) ECommerce: totalQuantity by half_year + no dimension",
171+
"querying custom granularities (with preaggregation) ECommerce: totalQuantity by half_year + dimension",
170172
"pre-aggregations Customers: running total without time dimension",
171173
"querying BigECommerce: totalProfitYearAgo",
172174
"SQL API: post-aggregate percentage of total",

packages/cubejs-testing-drivers/src/tests/testQueries.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { jest, expect, beforeAll, afterAll } from '@jest/globals';
22
import { randomBytes } from 'crypto';
3+
import { get } from 'env-var';
34
import { Client as PgClient } from 'pg';
45
import { BaseDriver } from '@cubejs-backend/base-driver';
56
import cubejs, { CubeApi } from '@cubejs-client/core';
@@ -26,7 +27,7 @@ export function testQueries(type: string, { includeIncrementalSchemaSuite, exten
2627
describe(`Queries with the @cubejs-backend/${type}-driver${extendedEnv ? ` ${extendedEnv}` : ''}`, () => {
2728
jest.setTimeout(60 * 5 * 1000);
2829

29-
const isTesseractEnv = process.env.DRIVERS_TESTS_CUBEJS_TESSERACT_SQL_PLANNER && process.env.DRIVERS_TESTS_CUBEJS_TESSERACT_SQL_PLANNER.toLowerCase() === 'true';
30+
const isTesseractEnv =get('DRIVERS_TESTS_CUBEJS_TESSERACT_SQL_PLANNER').default('false').asBool();// process.env.DRIVERS_TESTS_CUBEJS_TESSERACT_SQL_PLANNER && process.env.DRIVERS_TESTS_CUBEJS_TESSERACT_SQL_PLANNER.toLowerCase() === 'true';
3031

3132
const fixtures = getFixtures(type, extendedEnv);
3233
let client: CubeApi;
@@ -77,7 +78,11 @@ export function testQueries(type: string, { includeIncrementalSchemaSuite, exten
7778
}
7879

7980
function executePg(name: string, test: (connection: PgClient) => Promise<void>) {
80-
if (!fixtures.cube.ports[1] || fixtures.skip && fixtures.skip.indexOf(name) >= 0) {
81+
if (!isTesseractEnv && fixtures.skip && fixtures.skip.indexOf(name) >= 0) {
82+
it.skip(name, () => {
83+
// nothing to do
84+
});
85+
} else if (isTesseractEnv && fixtures.tesseractSkip && fixtures.tesseractSkip.indexOf(name) >= 0) {
8186
it.skip(name, () => {
8287
// nothing to do
8388
});

0 commit comments

Comments
 (0)