Merge "next" branch into "master".
[sliver-openvswitch.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_NEGATIVE([column names may not begin with _],
14   [[parse-table mytable \
15     '{"columns": {"_column": {"type": "integer"}}}']],
16   [[names beginning with "_" are reserved]],
17   [table])
18
19 OVSDB_CHECK_NEGATIVE([table must have at least one column (1)],
20   [[parse-table mytable '{}']],
21   [[Parsing table schema for table mytable failed: Required 'columns' member is missing.]])
22
23 OVSDB_CHECK_NEGATIVE([table must have at least one column (2)],
24   [[parse-table mytable '{"columns": {}}']],
25   [[table must have at least one column]])