| source [expr {[info exists ::env(TESTS_DIR)] ? "$env(TESTS_DIR)/non-interactive/ly.tcl" : "ly.tcl"}] |
| |
| set mdir "$::env(YANG_MODULES_DIR)" |
| set ddir "$::env(TESTS_DIR)/data" |
| set err1 "Operational datastore takes effect only with RPCs/Actions/Replies/Notification input data types" |
| |
| test data_operational_twice {it is not allowed to specify more than one --operational parameter} { |
| ly_cmd_err "-t notif -O $ddir/modconfig.xml -O $ddir/modleaf.xml" "cannot be set multiple times" |
| } {} |
| |
| test data_operational_no_type {--operational should be with parameter --type} { |
| ly_cmd_err "-O $ddir/modconfig.xml $mdir/modoper-leafref.yang $ddir/modoper_leafref_notif.xml" $err1 |
| } {} |
| |
| test data_operational_missing {--operational is omitted and the datastore contents is in the data file} { |
| ly_cmd_err "$mdir/modoper-leafref.yang $ddir/modoper_leafref_notif_err.xml" "Failed to parse input data file" |
| } {} |
| |
| cleanupTests |