summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Privoznik <mprivozn@redhat.com>2011-07-22 16:07:28 +0200
committerDaniel Veillard <veillard@redhat.com>2011-07-25 13:50:06 +0800
commite5f1f9de77e5397436badbdf094b77d16d2b60d4 (patch)
treeaffe74b39bf2663fd1f1faa3c7571b7ae375d538
parentbandwidth: Implement functions to enable and disable QoS (diff)
downloadlibvirt-e5f1f9de77e5397436badbdf094b77d16d2b60d4.tar.gz
libvirt-e5f1f9de77e5397436badbdf094b77d16d2b60d4.tar.bz2
libvirt-e5f1f9de77e5397436badbdf094b77d16d2b60d4.zip
bandwidth: Add test cases for network
-rw-r--r--tests/networkxml2xmlin/bandwidth-network.xml16
-rw-r--r--tests/networkxml2xmlout/bandwidth-network.xml16
-rw-r--r--tests/networkxml2xmltest.c1
3 files changed, 33 insertions, 0 deletions
diff --git a/tests/networkxml2xmlin/bandwidth-network.xml b/tests/networkxml2xmlin/bandwidth-network.xml
new file mode 100644
index 000000000..555ee1866
--- /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 000000000..555ee1866
--- /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 f354b0de3..5cdbedb69 100644
--- a/tests/networkxml2xmltest.c
+++ b/tests/networkxml2xmltest.c
@@ -92,6 +92,7 @@ mymain(void)
DO_TEST("direct-net");
DO_TEST("host-bridge-net");
DO_TEST("vepa-net");
+ DO_TEST("bandwidth-network");
return (ret==0 ? EXIT_SUCCESS : EXIT_FAILURE);
}