@cubejs-backend/testing 1.0.6 → 1.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
cube("RequestsNonReadOnly", {
|
|
2
|
+
sql: `select 1 as tenant_id, 1 as deployment_id, 'req-1' as request_id, (NOW() - INTERVAL '1 day')::timestamp as timestamp
|
|
3
|
+
UNION ALL
|
|
4
|
+
select 2 as tenant_id, 1 as deployment_id, 'req-2' as request_id, (NOW() - INTERVAL '2 day')::timestamp as timestamp
|
|
5
|
+
`,
|
|
6
|
+
data_source: "postgres",
|
|
7
|
+
measures: {
|
|
8
|
+
count: {
|
|
9
|
+
type: "count",
|
|
10
|
+
},
|
|
11
|
+
},
|
|
12
|
+
dimensions: {
|
|
13
|
+
tenant_id: {
|
|
14
|
+
sql: `tenant_id`,
|
|
15
|
+
type: "number",
|
|
16
|
+
},
|
|
17
|
+
request_id: {
|
|
18
|
+
sql: `request_id`,
|
|
19
|
+
type: "string",
|
|
20
|
+
},
|
|
21
|
+
timestamp: {
|
|
22
|
+
sql: `timestamp`,
|
|
23
|
+
type: "time",
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
pre_aggregations: {
|
|
27
|
+
batch_streaming_lambda: {
|
|
28
|
+
type: `rollup_lambda`,
|
|
29
|
+
rollups: [batch, RequestsNonReadOnlyStream.stream],
|
|
30
|
+
},
|
|
31
|
+
|
|
32
|
+
batch: {
|
|
33
|
+
external: true,
|
|
34
|
+
type: "rollup",
|
|
35
|
+
measures: [count],
|
|
36
|
+
dimensions: [tenant_id, request_id, timestamp],
|
|
37
|
+
granularity: "day",
|
|
38
|
+
time_dimension: RequestsNonReadOnly.timestamp,
|
|
39
|
+
partition_granularity: "day",
|
|
40
|
+
build_range_start: { sql: "SELECT NOW() - INTERVAL '10 day'" },
|
|
41
|
+
build_range_end: { sql: "SELECT NOW()" },
|
|
42
|
+
},
|
|
43
|
+
},
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
cube("RequestsNonReadOnlyStream", {
|
|
47
|
+
dataSource: "ksql",
|
|
48
|
+
|
|
49
|
+
sql: `SELECT * FROM REQUESTS`,
|
|
50
|
+
|
|
51
|
+
measures: {
|
|
52
|
+
count: {
|
|
53
|
+
type: "count",
|
|
54
|
+
},
|
|
55
|
+
},
|
|
56
|
+
dimensions: {
|
|
57
|
+
tenant_id: {
|
|
58
|
+
sql: `TENANT_ID`,
|
|
59
|
+
type: "number",
|
|
60
|
+
},
|
|
61
|
+
request_id: {
|
|
62
|
+
sql: `REQUEST_ID`,
|
|
63
|
+
type: "string",
|
|
64
|
+
},
|
|
65
|
+
timestamp: {
|
|
66
|
+
sql: `TIMESTAMP`,
|
|
67
|
+
type: "time",
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
preAggregations: {
|
|
71
|
+
stream: {
|
|
72
|
+
streamOffset: "earliest",
|
|
73
|
+
type: `rollup`,
|
|
74
|
+
measures: [count],
|
|
75
|
+
dimensions: [tenant_id, request_id, timestamp],
|
|
76
|
+
time_dimension: RequestsNonReadOnlyStream.timestamp,
|
|
77
|
+
granularity: "day",
|
|
78
|
+
partition_granularity: "day",
|
|
79
|
+
build_range_start: { sql: "SELECT DATE_SUB(NOW(), interval '96 hour')" },
|
|
80
|
+
build_range_end: { sql: "SELECT NOW()" }
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cubejs-backend/testing",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.8",
|
|
4
4
|
"description": "Cube.js e2e tests",
|
|
5
5
|
"author": "Cube Dev, Inc.",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -90,15 +90,15 @@
|
|
|
90
90
|
"birdbox-fixtures"
|
|
91
91
|
],
|
|
92
92
|
"dependencies": {
|
|
93
|
-
"@cubejs-backend/cubestore-driver": "1.0.
|
|
93
|
+
"@cubejs-backend/cubestore-driver": "1.0.8",
|
|
94
94
|
"@cubejs-backend/dotenv": "^9.0.2",
|
|
95
|
-
"@cubejs-backend/ksql-driver": "1.0.
|
|
96
|
-
"@cubejs-backend/postgres-driver": "1.0.
|
|
97
|
-
"@cubejs-backend/query-orchestrator": "1.0.
|
|
98
|
-
"@cubejs-backend/schema-compiler": "1.0.
|
|
99
|
-
"@cubejs-backend/shared": "1.0.
|
|
100
|
-
"@cubejs-backend/testing-shared": "1.0.
|
|
101
|
-
"@cubejs-client/ws-transport": "
|
|
95
|
+
"@cubejs-backend/ksql-driver": "1.0.8",
|
|
96
|
+
"@cubejs-backend/postgres-driver": "1.0.8",
|
|
97
|
+
"@cubejs-backend/query-orchestrator": "1.0.8",
|
|
98
|
+
"@cubejs-backend/schema-compiler": "1.0.8",
|
|
99
|
+
"@cubejs-backend/shared": "1.0.8",
|
|
100
|
+
"@cubejs-backend/testing-shared": "1.0.8",
|
|
101
|
+
"@cubejs-client/ws-transport": "1.0.8",
|
|
102
102
|
"dedent": "^0.7.0",
|
|
103
103
|
"fs-extra": "^8.1.0",
|
|
104
104
|
"http-proxy": "^1.18.1",
|
|
@@ -109,8 +109,8 @@
|
|
|
109
109
|
},
|
|
110
110
|
"devDependencies": {
|
|
111
111
|
"@4tw/cypress-drag-drop": "^1.6.0",
|
|
112
|
-
"@cubejs-backend/linter": "
|
|
113
|
-
"@cubejs-client/core": "
|
|
112
|
+
"@cubejs-backend/linter": "1.0.8",
|
|
113
|
+
"@cubejs-client/core": "1.0.8",
|
|
114
114
|
"@jest/globals": "^27",
|
|
115
115
|
"@types/dedent": "^0.7.0",
|
|
116
116
|
"@types/http-proxy": "^1.17.5",
|
|
@@ -146,5 +146,5 @@
|
|
|
146
146
|
"eslintConfig": {
|
|
147
147
|
"extends": "../cubejs-linter"
|
|
148
148
|
},
|
|
149
|
-
"gitHead": "
|
|
149
|
+
"gitHead": "ccf852060e21c1d32253e0bae37d7f2d07fa5937"
|
|
150
150
|
}
|