X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=tests%2Fovsdb-schema.at;h=00da808391d64c0a77c16868078b14eb6f940bdd;hb=994145e0f7c66d4cdada1d15a5fd4699931069fc;hp=d129093a216d1641b541d736196dbc4196599df8;hpb=8159b984dced44851670bd48e204b4e854941a24;p=sliver-openvswitch.git diff --git a/tests/ovsdb-schema.at b/tests/ovsdb-schema.at index d129093a2..00da80839 100644 --- a/tests/ovsdb-schema.at +++ b/tests/ovsdb-schema.at @@ -23,6 +23,38 @@ OVSDB_CHECK_POSITIVE_CPY([schema with valid refTables], "type": "uuid", "refTable": "a"}}}}}}}']], [[{"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"}}}}}},"version":"4.2.1"}]]) + +dnl Ephemeral strong references to root set tables are OK. +dnl Ephemeral strong references to non-root set tables are forced to be +dnl persistent. +OVSDB_CHECK_POSITIVE_CPY([schema with ephemeral strong references], + [[parse-schema \ + '{"name": "mydb", + "version": "4.2.1", + "tables": { + "a": { + "columns": { + "x": { + "type": { + "key": { + "type": "uuid", + "refTable": "b"}}, + "ephemeral": true}, + "y": { + "type": { + "key": { + "type": "uuid", + "refTable": "a"}}, + "ephemeral": true}}}, + "b": { + "columns": { + "aRef": { + "type": { + "key": { + "type": "uuid", + "refTable": "a"}}}}, + "isRoot": true}}}']], + [[{"name":"mydb","tables":{"a":{"columns":{"x":{"ephemeral":true,"type":{"key":{"refTable":"b","type":"uuid"}}},"y":{"type":{"key":{"refTable":"a","type":"uuid"}}}}},"b":{"columns":{"aRef":{"type":{"key":{"refTable":"a","type":"uuid"}}}},"isRoot":true}},"version":"4.2.1"}]]) dnl Schemas without version numbers are accepted for backward dnl compatibility, but this is a deprecated feature.