]>
Commit | Line | Data |
---|---|---|
0d0f05b9 BP |
1 | AT_BANNER([OVSDB -- schemas]) |
2 | ||
3 | OVSDB_CHECK_POSITIVE([schema with valid refTables], | |
4 | [[parse-schema \ | |
5 | '{"name": "mydb", | |
6 | "tables": { | |
7 | "a": { | |
8 | "columns": { | |
9 | "map": { | |
10 | "type": { | |
11 | "key": { | |
12 | "type": "uuid", | |
13 | "refTable": "b"}, | |
14 | "value": { | |
15 | "type": "uuid", | |
16 | "refTable": "a"}}}}}, | |
17 | "b": { | |
18 | "columns": { | |
19 | "aRef": { | |
20 | "type": { | |
21 | "key": { | |
22 | "type": "uuid", | |
23 | "refTable": "a"}}}}}}}']], | |
24 | [[{"name":"mydb","tables":{"a":{"columns":{"map":{"type":{"key":{"refTable":"b","type":"uuid"},"value":{"refTable":"a","type":"uuid"}}}}},"b":{"columns":{"aRef":{"type":{"key":{"refTable":"a","type":"uuid"}}}}}}}]]) | |
25 | ||
26 | OVSDB_CHECK_NEGATIVE([schema with invalid refTables], | |
27 | [[parse-schema \ | |
28 | '{"name": "mydb", | |
29 | "tables": { | |
30 | "a": { | |
31 | "columns": { | |
32 | "map": { | |
33 | "type": { | |
34 | "key": { | |
35 | "type": "uuid", | |
36 | "refTable": "c"}, | |
37 | "value": { | |
38 | "type": "uuid", | |
39 | "refTable": "a"}}}}}, | |
40 | "b": { | |
41 | "columns": { | |
42 | "aRef": { | |
43 | "type": { | |
44 | "key": { | |
45 | "type": "uuid", | |
46 | "refTable": "a"}}}}}}}']], | |
47 | [[test-ovsdb: syntax error: column map key refers to undefined table c]]) |