]> git.proxmox.com Git - ovs.git/blob - tests/ovsdb-table.at
Merge "master" into "next".
[ovs.git] / tests / ovsdb-table.at
1 AT_BANNER([OVSDB -- tables])
2
3 OVSDB_CHECK_POSITIVE([table with one column],
4 [[parse-table mytable '{"columns": {"name": {"type": "string"}}}']],
5 [[{"columns":{"name":{"type":"string"}}}]])
6
7 OVSDB_CHECK_POSITIVE([immutable table with one column],
8 [[parse-table mytable \
9 '{"columns": {"name": {"type": "string"}},
10 "mutable": false}']],
11 [[{"columns":{"name":{"type":"string"}},"mutable":false}]])
12
13 OVSDB_CHECK_POSITIVE([table with comment],
14 [[parse-table mytable \
15 '{"columns": {"name": {"type": "string"}},
16 "comment": "description of table"}']],
17 [[{"columns":{"name":{"type":"string"}},"comment":"description of table"}]])
18
19 OVSDB_CHECK_NEGATIVE([column names may not begin with _],
20 [[parse-table mytable \
21 '{"columns": {"_column": {"type": "integer"}}}']],
22 [[names beginning with "_" are reserved]],
23 [table])
24
25 OVSDB_CHECK_NEGATIVE([table must have at least one column (1)],
26 [[parse-table mytable '{}']],
27 [[Parsing table schema for table mytable failed: Required 'columns' member is missing.]])
28
29 OVSDB_CHECK_NEGATIVE([table must have at least one column (2)],
30 [[parse-table mytable '{"columns": {}}']],
31 [[table must have at least one column]])