Merge pull request #1190 from tmc/add-ent2d2-e2e-test

e2etests: Add ent2d2 test case
This commit is contained in:
Alexander Wang 2023-04-12 22:24:59 -07:00 committed by GitHub
commit cce35e5d05
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 2468 additions and 0 deletions

View file

@ -2592,6 +2592,7 @@ scenarios: {
loadFromFile(t, "executive_grid"),
loadFromFile(t, "grid_animated"),
loadFromFile(t, "grid_gap"),
loadFromFile(t, "ent2d2_basic"),
}
runa(t, tcs)

98
e2etests/testdata/files/ent2d2_basic.d2 vendored Normal file
View file

@ -0,0 +1,98 @@
# Edges
User <-> User: "spouse" {
# o2o optional
source-arrowhead: {
shape: cf-one-required
}
target-arrowhead: {
shape: cf-one
}
}
User <-> User: "children/parent" {
# o2m optional
source-arrowhead: {
shape: cf-one-required
}
target-arrowhead: {
shape: cf-many
}
}
User <-> Pet: "pets/owner" {
# o2m optional
source-arrowhead: {
shape: cf-one-required
}
target-arrowhead: {
shape: cf-many
}
}
User <-> Card: "card/owner" {
# o2o optional
source-arrowhead: {
shape: cf-one-required
}
target-arrowhead: {
shape: cf-one
}
}
User <-> Post: "posts/author" {
# o2m optional
source-arrowhead: {
shape: cf-one-required
}
target-arrowhead: {
shape: cf-many
}
}
User <-> Metadata: "metadata/user" {
# o2m optional
source-arrowhead: {
shape: cf-one-required
}
target-arrowhead: {
shape: cf-many
}
}
User <-> Info: "info/user" {
# o2m optional
source-arrowhead: {
shape: cf-one-required
}
target-arrowhead: {
shape: cf-many
}
}
# Tables
Card: {
shape: sql_table
id: int {constraint: primary_key}
owner_id: int {constraint: foreign_key}
}
Info: {
shape: sql_table
id: int {constraint: primary_key}
content: json.RawMessage
}
Metadata: {
shape: sql_table
id: int {constraint: primary_key}
age: int
}
Pet: {
shape: sql_table
id: int {constraint: primary_key}
owner_id: int {constraint: foreign_key}
}
Post: {
shape: sql_table
id: int {constraint: primary_key}
text: string
author_id: int {constraint: foreign_key}
}
User: {
shape: sql_table
id: int {constraint: primary_key}
parent_id: int {constraint: foreign_key}
spouse_id: int {constraint: foreign_key}
}

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 29 KiB

1033
e2etests/testdata/stable/ent2d2_basic/elk/board.exp.json generated vendored Normal file

File diff suppressed because it is too large Load diff

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 30 KiB