Mailinglist Archive: yast-commit (396 mails)

< Previous Next >
[yast-commit] r65338 - in /trunk/network/testsuite/tests: Network_YaPI.out Network_YaPI.ycp
Author: mvidner
Date: Fri Aug 12 16:46:49 2011
New Revision: 65338

URL: http://svn.opensuse.org/viewcvs/yast?rev=65338&view=rev
Log:
Added tests

Modified:
trunk/network/testsuite/tests/Network_YaPI.out
trunk/network/testsuite/tests/Network_YaPI.ycp

Modified: trunk/network/testsuite/tests/Network_YaPI.out
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/network/testsuite/tests/Network_YaPI.out?rev=65338&r1=65337&r2=65338&view=diff
==============================================================================
--- trunk/network/testsuite/tests/Network_YaPI.out (original)
+++ trunk/network/testsuite/tests/Network_YaPI.out Fri Aug 12 16:46:49 2011
@@ -12,12 +12,24 @@
Execute .target.bash "rpm -q --whatprovides SuSEfirewall2" 0
Read .init.scripts.exists "SuSEfirewall2_init" false
Read .sysconfig.sysctl.IP_FORWARD nil
-Dir .network.section: ["eth0", "eth1"]
+Dir .network.section: ["eth0", "eth1", "eth2", "eth3", "eth4"]
Dir .network.value."eth0": ["BOOTPROTO"]
Read .network.value."eth0".BOOTPROTO "dhcp4"
Dir .network.value."eth1": ["BOOTPROTO", "IPADDR"]
Read .network.value."eth1".BOOTPROTO "static"
Read .network.value."eth1".IPADDR "1.2.3.4/24"
+Dir .network.value."eth2": ["BOOTPROTO", "IPADDR", "PREFIXLEN"]
+Read .network.value."eth2".BOOTPROTO "static"
+Read .network.value."eth2".IPADDR "1.2.3.5/24"
+Read .network.value."eth2".PREFIXLEN ""
+Dir .network.value."eth3": ["BOOTPROTO", "IPADDR", "PREFIXLEN"]
+Read .network.value."eth3".BOOTPROTO "static"
+Read .network.value."eth3".IPADDR "1.2.3.6"
+Read .network.value."eth3".PREFIXLEN "24"
+Dir .network.value."eth4": ["BOOTPROTO", "IPADDR", "NETMASK"]
+Read .network.value."eth4".BOOTPROTO "static"
+Read .network.value."eth4".IPADDR "1.2.3.7"
+Read .network.value."eth4".NETMASK "255.255.255.0"
Read .target.size "/etc/install.inf" 27
Dir .etc.install_inf: []
Read .target.string "/proc/cmdline" "laptop.suse.cz"
@@ -33,7 +45,7 @@
Read .target.lstat "/etc/sysconfig/network/ifcfg-tr-usb" nil
Execute .target.bash_output "hostname --fqdn" $["exit":0,
"stdout":"laptop.suse.cz"]
Execute .target.bash_output "hostname --fqdn" $["exit":0,
"stdout":"laptop.suse.cz"]
-Return $["dns":$["nameservers":["208.67.222.222", "208.67.220.220"],
"searches":["suse.cz", "suse.de"]], "hostname":$["dhcp_hostname":"1",
"domain":"suse.cz", "name":"laptop"],
"interfaces":$["eth0":$["bootproto":"dhcp4"], "eth1":$["bootproto":"static",
"ipaddr":"1.2.3.4/24"]], "routes":$["default":$["via":"10.20.30.40"]]]
+Return $["dns":$["nameservers":["208.67.222.222", "208.67.220.220"],
"searches":["suse.cz", "suse.de"]], "hostname":$["dhcp_hostname":"1",
"domain":"suse.cz", "name":"laptop"],
"interfaces":$["eth0":$["bootproto":"dhcp4"], "eth1":$["bootproto":"static",
"ipaddr":"1.2.3.4/24"], "eth2":$["bootproto":"static", "ipaddr":"1.2.3.5/24"],
"eth3":$["bootproto":"static", "ipaddr":"1.2.3.6/24"],
"eth4":$["bootproto":"static", "ipaddr":"1.2.3.7/24"]],
"routes":$["default":$["via":"10.20.30.40"]]]
Return $["error":"", "exit":"0"]
Read .target.size "/etc/sysconfig/network/routes" 27
Read .routes [$["destination":"default", "gateway":"10.20.30.40"]]
@@ -50,3 +62,26 @@
Write .routes [$["destination":"default", "device":"-",
"gateway":"10.20.30.40", "netmask":"-"]] true
Return $["error":"", "exit":"0"]
Return $["error":"A valid IP address consists of four integers\nin the range
0-255 separated by dots.", "exit":"-1"]
+Write .network.value."eth3".BOOTPROTO "static" true
+Write .network.value."eth3".IPADDR "1.2.3.7/24" true
+Write .network.value."eth3".STARTMODE "auto" true
+Write .network nil true
+Read .init.scripts.exists "network" false
+Return $["error":"", "exit":"0"]
+Read .target.size "/etc/sysconfig/network/routes" 27
+Read .routes [$["destination":"default", "gateway":"10.20.30.40"]]
+Read .init.scripts.exists "SuSEfirewall2_init" false
+Read .sysconfig.sysctl.IP_FORWARD nil
+Read .probe.netcard nil
+Log hardware detection failure
+Read .etc.install_inf.BrokenModules nil
+Read .udev_persistent.net nil
+Dir .modules.options: []
+Read .udev_persistent.drivers nil
+Read .target.lstat "/etc/sysconfig/network/ifcfg-eth-pcmcia" nil
+Read .target.lstat "/etc/sysconfig/network/ifcfg-eth-usb" nil
+Read .target.lstat "/etc/sysconfig/network/ifcfg-tr-pcmcia" nil
+Read .target.lstat "/etc/sysconfig/network/ifcfg-tr-usb" nil
+Execute .target.bash_output "hostname --fqdn" $["exit":0,
"stdout":"laptop.suse.cz"]
+Execute .target.bash_output "hostname --fqdn" $["exit":0,
"stdout":"laptop.suse.cz"]
+Return $["dns":$["nameservers":["208.67.222.222", "208.67.220.220"],
"searches":["suse.cz", "suse.de"]], "hostname":$["dhcp_hostname":"1",
"domain":"suse.cz", "name":"laptop"],
"interfaces":$["eth0":$["bootproto":"dhcp4"], "eth1":$["bootproto":"static",
"ipaddr":"1.2.3.4/24"], "eth2":$["bootproto":"static", "ipaddr":"1.2.3.5/24"],
"eth3":$["bootproto":"static", "ipaddr":"1.2.3.7/24/"],
"eth4":$["bootproto":"static", "ipaddr":"1.2.3.7/24"]],
"routes":$["default":$["via":"10.20.30.40"]]]

Modified: trunk/network/testsuite/tests/Network_YaPI.ycp
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/network/testsuite/tests/Network_YaPI.ycp?rev=65338&r1=65337&r2=65338&view=diff
==============================================================================
--- trunk/network/testsuite/tests/Network_YaPI.ycp (original)
+++ trunk/network/testsuite/tests/Network_YaPI.ycp Fri Aug 12 16:46:49 2011
@@ -26,7 +26,13 @@
],
],
"network" : $[
- "section" : $[ "eth0":$[], "eth1":$[] ],
+ "section" : $[
+ "eth0":$[],
+ "eth1":$[],
+ "eth2":$[],
+ "eth3":$[],
+ "eth4":$[],
+ ],
"value" : $[
"eth0" : $[
"BOOTPROTO" : "dhcp4"
@@ -34,7 +40,23 @@
"eth1" : $[
"BOOTPROTO" : "static",
"IPADDR" : "1.2.3.4/24"
- ]],
+ ],
+ "eth2" : $[
+ "BOOTPROTO" : "static",
+ "IPADDR" : "1.2.3.5/24",
+ "PREFIXLEN" : "",
+ ],
+ "eth3" : $[
+ "BOOTPROTO" : "static",
+ "IPADDR" : "1.2.3.6",
+ "PREFIXLEN" : "24",
+ ],
+ "eth4" : $[
+ "BOOTPROTO" : "static",
+ "IPADDR" : "1.2.3.7",
+ "NETMASK" : "255.255.255.0",
+ ],
+ ],
],
"routes" : [ $["destination":"default", "gateway":"10.20.30.40"] ]
];
@@ -57,4 +79,8 @@

// test incorrect default route (invalid gw IP)
TEST(``(YaPI::NETWORK::Write($["route":$["default":$["via":"10.20.30"]]])),
[READ], nil);
+
+TEST(``(YaPI::NETWORK::Write($["interface":$["eth3":$["bootproto":"static",
"ipaddr":"1.2.3.7/24"]]])), [READ], nil);
+TEST(``(YaPI::NETWORK::Read()), [READ, $[], EXEC], nil);
+
}

--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages