Skip to content

Commit 86460e0

Browse files
committed
fix test
1 parent b2b83d3 commit 86460e0

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

packages/cubejs-schema-compiler/test/unit/fixtures/orders_big.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ cubes:
6262
allowAll: true
6363
- role: admin
6464
conditions:
65-
- if: "{ !security_context.isBlocked }"
65+
- if: "{ security_context.isNotBlocked }"
6666
rowLevel:
6767
filters:
6868
- member: status

packages/cubejs-schema-compiler/test/unit/fixtures/orders_incorrect_acl.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ cubes:
6262
allowAll: true
6363
- role: admin
6464
conditions:
65-
- if: "{ !security_context.isBlocked }"
65+
- if: "{ security_context.isNotBlocked }"
6666
rowLevel:
6767
filters:
6868
- member: "{CUBE}.order_users.name"

packages/cubejs-schema-compiler/test/unit/fixtures/orders_nonexist_acl.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ cubes:
6262
allowAll: true
6363
- role: admin
6464
conditions:
65-
- if: "{ !security_context.isBlocked }"
65+
- if: "{ security_context.isNotBlocked }"
6666
rowLevel:
6767
filters:
6868
- member: "{CUBE}.other.path.created_at"

packages/cubejs-schema-compiler/test/unit/yaml-schema.test.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ describe('Yaml Schema Testing', () => {
119119
const { compiler } = prepareYamlCompiler(
120120
`cubes:
121121
- name: Products
122-
sql: select { "string"+123 } from tbl
122+
sql: select { "string"+123 } as a1, { 123abc } as a2 from tbl
123123
dimensions:
124124
`
125125
);
@@ -223,7 +223,9 @@ describe('Yaml Schema Testing', () => {
223223

224224
throw new Error('compile must return an error');
225225
} catch (e: any) {
226-
expect(e.message).toContain('Users cube: "title" must be a string');
226+
expect(e.message).toMatch(
227+
/Users cube: "title" (must be a string|is not allowed to be empty)/
228+
);
227229
}
228230
});
229231

@@ -544,7 +546,7 @@ describe('Yaml Schema Testing', () => {
544546
accessPolicy:
545547
- role: admin
546548
conditions:
547-
- if: "{ !security_context.isBlocked }"
549+
- if: "{ security_context.isNotBlocked }"
548550
rowLevel:
549551
filters:
550552
- member: status

0 commit comments

Comments
 (0)