Skip to content

Commit

Permalink
addressing comments
Browse files Browse the repository at this point in the history
  • Loading branch information
d-jeffery committed Aug 6, 2024
1 parent a1a48a9 commit ed4828b
Showing 1 changed file with 30 additions and 15 deletions.
45 changes: 30 additions & 15 deletions tests/data/dsl-semantic-validation-cases.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1415,7 +1415,7 @@

# Cycle tests

- name: cycle 1
- name: cycle 1 should fail
dsl: |
model
schema 1.1
Expand Down Expand Up @@ -1443,7 +1443,7 @@
metadata:
errorType: relation-no-entry-point

- name: cycle 2
- name: cycle 2 should fail
dsl: |
model
schema 1.1
Expand Down Expand Up @@ -1483,7 +1483,7 @@

# Cycles currnetly not being caught

- name: cycle 3
- name: cycle 3 should fail
skip: true
dsl: |
model
Expand Down Expand Up @@ -1523,7 +1523,7 @@
metadata:
errorType: relation-no-entry-point

- name: cycle 4
- name: cycle 4 should fail
skip: true
dsl: |
model
Expand Down Expand Up @@ -1563,7 +1563,7 @@
metadata:
errorType: relation-no-entry-point

- name: cycle 5
- name: cycle 5 should fail
skip: true
dsl: |
model
Expand Down Expand Up @@ -1613,7 +1613,7 @@
metadata:
errorType: relation-no-entry-point

- name: cycle 6
- name: cycle 6 should fail
skip: true
dsl: |
model
Expand Down Expand Up @@ -1667,7 +1667,7 @@

# Validate

- name: direct_relationship_with_entrypoint
- name: direct_relationship_with_entrypoint should pass
dsl: |
model
schema 1.1
Expand All @@ -1676,7 +1676,9 @@
type document
relations
define viewer: [user]
- name: computed_relationship_with_entrypoint
expected_errors: []

- name: computed_relationship_with_entrypoint should pass
dsl: |
model
schema 1.1
Expand All @@ -1686,7 +1688,9 @@
relations
define editor: [user]
define viewer: editor
- name: no_entrypoint_1
expected_errors: []

- name: no_entrypoint_1 should fail
dsl: |
model
schema 1.1
Expand Down Expand Up @@ -1726,7 +1730,8 @@
end: 18
metadata:
errorType: relation-no-entry-point
- name: no_entrypoint_2

- name: no_entrypoint_2 should fail
dsl: |
model
schema 1.1
Expand Down Expand Up @@ -1766,7 +1771,8 @@
end: 18
metadata:
errorType: relation-no-entry-point
- name: no_entrypoint_3a

- name: no_entrypoint_3a should fail
dsl: |
model
schema 1.1
Expand All @@ -1786,7 +1792,8 @@
end: 17
metadata:
errorType: relation-no-entry-point
- name: no_entrypoint_3b

- name: no_entrypoint_3b should fail
dsl: |
model
schema 1.1
Expand All @@ -1806,7 +1813,8 @@
end: 17
metadata:
errorType: relation-no-entry-point
- name: no_entrypoint_4

- name: no_entrypoint_4 should fail
dsl: |
model
schema 1.1
Expand All @@ -1832,7 +1840,8 @@
end: 37
metadata:
errorType: invalid-relation-on-tupleset
- name: self_referencing_type_restriction_with_entrypoint_1

- name: self_referencing_type_restriction_with_entrypoint_1 should pass
dsl: |
model
schema 1.1
Expand All @@ -1845,7 +1854,9 @@
define viewer: [document#viewer] or editor
define can_view: viewer but not restricted
define can_view_actual: can_view
- name: self_referencing_type_restriction_with_entrypoint_2
expected_errors: []

- name: self_referencing_type_restriction_with_entrypoint_2 should pass
dsl: |
model
schema 1.1
Expand All @@ -1855,6 +1866,7 @@
relations
define editor: [user]
define viewer: [document#viewer] or editor
expected_errors: []

# Models with loops, but are valid because of an entry point

Expand All @@ -1871,6 +1883,7 @@
define action2: admin or action3 or action1
define action3: admin or action1 or action2
expected_errors: []

- name: union does not require all child to have entry even for intersection child
skip: true
dsl: |
Expand All @@ -1885,6 +1898,7 @@
define intersection1: union1 and union2
define intersection2: union1 and union2
expected_errors: []

- name: union does not require all child to have entry even for exclusion child
skip: true
dsl: |
Expand All @@ -1899,6 +1913,7 @@
define exclusion1: admin but not union1
define exclusion2: admin but not union2
expected_errors: []

#- name: invalid cel expression
# dsl: |
# model
Expand Down

0 comments on commit ed4828b

Please sign in to comment.