summaryrefslogtreecommitdiff
path: root/tests/data
diff options
context:
space:
mode:
Diffstat (limited to 'tests/data')
-rw-r--r--tests/data/config.boot.default40
-rw-r--r--tests/data/config.valid39
-rw-r--r--tests/data/interface-definitions/test-op.xml21
-rw-r--r--tests/data/interface-definitions/test.xml24
4 files changed, 124 insertions, 0 deletions
diff --git a/tests/data/config.boot.default b/tests/data/config.boot.default
new file mode 100644
index 000000000..0a75716b8
--- /dev/null
+++ b/tests/data/config.boot.default
@@ -0,0 +1,40 @@
+system {
+ host-name vyos
+ login {
+ user vyos {
+ authentication {
+ encrypted-password $6$QxPS.uk6mfo$9QBSo8u1FkH16gMyAVhus6fU3LOzvLR9Z9.82m3tiHFAxTtIkhaZSWssSgzt4v4dGAL8rhVQxTg0oAG9/q11h/
+ plaintext-password ""
+ }
+ level admin
+ }
+ }
+ syslog {
+ global {
+ facility all {
+ level notice
+ }
+ facility protocols {
+ level debug
+ }
+ }
+ }
+ ntp {
+ server "0.pool.ntp.org"
+ server "1.pool.ntp.org"
+ server "2.pool.ntp.org"
+ }
+ console {
+ device ttyS0 {
+ speed 9600
+ }
+ }
+ config-management {
+ commit-revisions 100
+ }
+}
+
+interfaces {
+ loopback lo {
+ }
+}
diff --git a/tests/data/config.valid b/tests/data/config.valid
new file mode 100644
index 000000000..1fbdd1505
--- /dev/null
+++ b/tests/data/config.valid
@@ -0,0 +1,39 @@
+/* top level leaf node */
+top-level-leaf-node foo
+
+top-level-valueless-node
+
+top-level-tag-node foo {
+ top-level-tag-node-child some-value
+}
+
+top-level-tag-node bar {
+ top-level-tag-node-child another-value
+}
+
+normal-node {
+ normal-node-child {
+ valueless-node
+ multi-node value1
+ /* valueless node comment */
+ another-valueless-node
+ multi-node value1
+ tag-node foo {
+ }
+ one-more-valueless-node
+ tag-node bar {
+ some-option some-value
+ }
+ }
+ option-with-quoted-value "some-value"
+}
+
+trailing-leaf-node-option some-value
+
+empty-node {
+}
+
+trailing-leaf-node-without-value
+
+// Trailing comment
+// Another trailing comment
diff --git a/tests/data/interface-definitions/test-op.xml b/tests/data/interface-definitions/test-op.xml
new file mode 100644
index 000000000..50bd686ae
--- /dev/null
+++ b/tests/data/interface-definitions/test-op.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="foo">
+ <properties>
+ <help>foo</help>
+ </properties>
+ <children>
+ <leafNode name="bar">
+ <command>/usr/bin/bar</command>
+ <properties>
+ <help>bar</help>
+ <completionHelp>
+ <list>foo bar</list>
+ <path>interfaces tunnel</path>
+ <script>/usr/bin/foo</script>
+ </completionHelp>
+ </properties>
+ </leafNode>
+ </children>
+ </node>
+</interfaceDefinition>
diff --git a/tests/data/interface-definitions/test.xml b/tests/data/interface-definitions/test.xml
new file mode 100644
index 000000000..fbb302e70
--- /dev/null
+++ b/tests/data/interface-definitions/test.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0"?>
+<interfaceDefinition>
+ <node name="foo">
+ <properties>
+ <help>foo</help>
+ </properties>
+ <children>
+ <leafNode name="bar">
+ <properties>
+ <help>bar</help>
+ <valueHelp>
+ <format>bar</format>
+ <description>bar</description>
+ </valueHelp>
+ <completionHelp>
+ <list>foo bar</list>
+ <path>interfaces tunnel</path>
+ <script>/usr/bin/foo</script>
+ </completionHelp>
+ </properties>
+ </leafNode>
+ </children>
+ </node>
+</interfaceDefinition>