Re: [PATCH 6/7] bandwidth: Add test cases for network

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 07/18/2011 04:05 PM, Michal Privoznik wrote:
---
  tests/networkxml2xmlin/bandwidth-network.xml  |   16 ++++++++++++++++
  tests/networkxml2xmlout/bandwidth-network.xml |   16 ++++++++++++++++
  tests/networkxml2xmltest.c                    |    1 +
  3 files changed, 33 insertions(+), 0 deletions(-)
  create mode 100644 tests/networkxml2xmlin/bandwidth-network.xml
  create mode 100644 tests/networkxml2xmlout/bandwidth-network.xml

Again, I think this should be included with the RNG, parse, formatter, and docs in a single self-contained unit.

diff --git a/tests/networkxml2xmlin/bandwidth-network.xml b/tests/networkxml2xmlin/bandwidth-network.xml
new file mode 100644
index 0000000..555ee18
--- /dev/null
+++ b/tests/networkxml2xmlin/bandwidth-network.xml
@@ -0,0 +1,16 @@
+<network>
+<name>test-net</name>
+<uuid>986fed9e-a488-186d-ef2d-17ebfd1993f8</uuid>
+<forward mode='nat'/>
+<bridge name='virbr1' stp='on' delay='0' />
+<mac address='52:54:00:E6:A2:C9'/>
+<bandwidth>
+<inbound average='1000' peak='2000' burst='1024'/>
+<outbound average='2000'/>
+</bandwidth>
+<ip address='192.168.120.1' netmask='255.255.255.0'>
+<dhcp>
+<range start='192.168.120.2' end='192.168.120.254' />
+</dhcp>
+</ip>
+</network>
diff --git a/tests/networkxml2xmlout/bandwidth-network.xml b/tests/networkxml2xmlout/bandwidth-network.xml
new file mode 100644
index 0000000..555ee18
--- /dev/null
+++ b/tests/networkxml2xmlout/bandwidth-network.xml
@@ -0,0 +1,16 @@
+<network>
+<name>test-net</name>
+<uuid>986fed9e-a488-186d-ef2d-17ebfd1993f8</uuid>
+<forward mode='nat'/>
+<bridge name='virbr1' stp='on' delay='0' />
+<mac address='52:54:00:E6:A2:C9'/>
+<bandwidth>
+<inbound average='1000' peak='2000' burst='1024'/>
+<outbound average='2000'/>
+</bandwidth>
+<ip address='192.168.120.1' netmask='255.255.255.0'>
+<dhcp>
+<range start='192.168.120.2' end='192.168.120.254' />
+</dhcp>
+</ip>
+</network>
diff --git a/tests/networkxml2xmltest.c b/tests/networkxml2xmltest.c
index 065166d..9dac7b4 100644
--- a/tests/networkxml2xmltest.c
+++ b/tests/networkxml2xmltest.c
@@ -88,6 +88,7 @@ mymain(void)
      DO_TEST("netboot-proxy-network");
      DO_TEST("nat-network-dns-txt-record");
      DO_TEST("nat-network-dns-hosts");
+    DO_TEST("bandwidth-network");

      return (ret==0 ? EXIT_SUCCESS : EXIT_FAILURE);
  }

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]