summaryrefslogtreecommitdiffstats
path: root/test/test-network-generator-conversion
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2019-12-10 13:04:39 +0100
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2020-03-28 11:46:48 +0100
commitfbaa11372bd0f956bb92aa905e2e6981c1ff5f1b (patch)
treebb4668a107839fed60542e12749150bed40d30d3 /test/test-network-generator-conversion
parenttest: move TEST-34-DYNAMICUSERMIGRATE setup to static files (diff)
downloadsystemd-fbaa11372bd0f956bb92aa905e2e6981c1ff5f1b.tar.xz
systemd-fbaa11372bd0f956bb92aa905e2e6981c1ff5f1b.zip
test: convert TEST-35-NETWORK-GENERATOR into a unit test
Diffstat (limited to 'test/test-network-generator-conversion')
-rw-r--r--test/test-network-generator-conversion/test-01-dhcp.expected/91-default.network11
-rw-r--r--test/test-network-generator-conversion/test-01-dhcp.input1
-rw-r--r--test/test-network-generator-conversion/test-02-bridge.expected/90-bridge99.netdev5
-rw-r--r--test/test-network-generator-conversion/test-02-bridge.expected/90-bridge99.network13
-rw-r--r--test/test-network-generator-conversion/test-02-bridge.expected/90-eth0.network21
-rw-r--r--test/test-network-generator-conversion/test-02-bridge.expected/90-eth1.network21
-rw-r--r--test/test-network-generator-conversion/test-02-bridge.input4
-rw-r--r--test/test-network-generator-conversion/test-03-issue-14319.expected/90-enp3s0.network17
-rw-r--r--test/test-network-generator-conversion/test-03-issue-14319.input1
9 files changed, 94 insertions, 0 deletions
diff --git a/test/test-network-generator-conversion/test-01-dhcp.expected/91-default.network b/test/test-network-generator-conversion/test-01-dhcp.expected/91-default.network
new file mode 100644
index 0000000000..e42ce1e311
--- /dev/null
+++ b/test/test-network-generator-conversion/test-01-dhcp.expected/91-default.network
@@ -0,0 +1,11 @@
+# Automatically generated by systemd-network-generator
+
+[Match]
+Name=*
+
+[Link]
+
+[Network]
+DHCP=ipv4
+
+[DHCP]
diff --git a/test/test-network-generator-conversion/test-01-dhcp.input b/test/test-network-generator-conversion/test-01-dhcp.input
new file mode 100644
index 0000000000..e55893e756
--- /dev/null
+++ b/test/test-network-generator-conversion/test-01-dhcp.input
@@ -0,0 +1 @@
+ip=dhcp
diff --git a/test/test-network-generator-conversion/test-02-bridge.expected/90-bridge99.netdev b/test/test-network-generator-conversion/test-02-bridge.expected/90-bridge99.netdev
new file mode 100644
index 0000000000..97c22485b7
--- /dev/null
+++ b/test/test-network-generator-conversion/test-02-bridge.expected/90-bridge99.netdev
@@ -0,0 +1,5 @@
+# Automatically generated by systemd-network-generator
+
+[NetDev]
+Kind=bridge
+Name=bridge99
diff --git a/test/test-network-generator-conversion/test-02-bridge.expected/90-bridge99.network b/test/test-network-generator-conversion/test-02-bridge.expected/90-bridge99.network
new file mode 100644
index 0000000000..f8d19baaea
--- /dev/null
+++ b/test/test-network-generator-conversion/test-02-bridge.expected/90-bridge99.network
@@ -0,0 +1,13 @@
+# Automatically generated by systemd-network-generator
+
+[Match]
+Name=bridge99
+
+[Link]
+MACAddress=00:11:22:33:44:55
+MTUBytes=1530
+
+[Network]
+DHCP=ipv4
+
+[DHCP]
diff --git a/test/test-network-generator-conversion/test-02-bridge.expected/90-eth0.network b/test/test-network-generator-conversion/test-02-bridge.expected/90-eth0.network
new file mode 100644
index 0000000000..8842b57921
--- /dev/null
+++ b/test/test-network-generator-conversion/test-02-bridge.expected/90-eth0.network
@@ -0,0 +1,21 @@
+# Automatically generated by systemd-network-generator
+
+[Match]
+Name=eth0
+
+[Link]
+
+[Network]
+DHCP=no
+DNS=10.10.10.10
+DNS=10.10.10.11
+Bridge=bridge99
+
+[DHCP]
+Hostname=hogehoge
+
+[Address]
+Address=192.168.0.10/24
+
+[Route]
+Gateway=192.168.0.1
diff --git a/test/test-network-generator-conversion/test-02-bridge.expected/90-eth1.network b/test/test-network-generator-conversion/test-02-bridge.expected/90-eth1.network
new file mode 100644
index 0000000000..feff4f5ba8
--- /dev/null
+++ b/test/test-network-generator-conversion/test-02-bridge.expected/90-eth1.network
@@ -0,0 +1,21 @@
+# Automatically generated by systemd-network-generator
+
+[Match]
+Name=eth1
+
+[Link]
+
+[Network]
+DHCP=no
+DNS=10.10.10.10
+DNS=10.10.10.11
+Bridge=bridge99
+
+[DHCP]
+Hostname=hogehoge
+
+[Address]
+Address=192.168.0.11/24
+
+[Route]
+Gateway=192.168.0.1
diff --git a/test/test-network-generator-conversion/test-02-bridge.input b/test/test-network-generator-conversion/test-02-bridge.input
new file mode 100644
index 0000000000..0c863fc356
--- /dev/null
+++ b/test/test-network-generator-conversion/test-02-bridge.input
@@ -0,0 +1,4 @@
+ip=192.168.0.10::192.168.0.1:255.255.255.0:hogehoge:eth0:off:10.10.10.10:10.10.10.11
+ip=192.168.0.11::192.168.0.1:255.255.255.0:hogehoge:eth1:off:10.10.10.10:10.10.10.11
+ip=bridge99:dhcp:1530:00:11:22:33:44:55
+bridge=bridge99:eth0,eth1
diff --git a/test/test-network-generator-conversion/test-03-issue-14319.expected/90-enp3s0.network b/test/test-network-generator-conversion/test-03-issue-14319.expected/90-enp3s0.network
new file mode 100644
index 0000000000..28ccfdd9b0
--- /dev/null
+++ b/test/test-network-generator-conversion/test-03-issue-14319.expected/90-enp3s0.network
@@ -0,0 +1,17 @@
+# Automatically generated by systemd-network-generator
+
+[Match]
+Name=enp3s0
+
+[Link]
+
+[Network]
+DHCP=no
+
+[DHCP]
+
+[Address]
+Address=10.99.37.44/16
+
+[Route]
+Gateway=10.99.10.1
diff --git a/test/test-network-generator-conversion/test-03-issue-14319.input b/test/test-network-generator-conversion/test-03-issue-14319.input
new file mode 100644
index 0000000000..3be752067b
--- /dev/null
+++ b/test/test-network-generator-conversion/test-03-issue-14319.input
@@ -0,0 +1 @@
+root=/dev/nfs nfsroot=10.99.37.240:/srv/netroot,v3,tcp ip=10.99.37.44::10.99.10.1:255.255.0.0::enp3s0:off