svn rev #23759: trunk/src/ lib/kadm5/unit-test/api.current/ tests/dejagnu/config/

ghudson@MIT.EDU ghudson at MIT.EDU
Sun Feb 28 15:32:01 EST 2010


http://src.mit.edu/fisheye/changelog/krb5/?cs=23759
Commit By: ghudson
Log Message:
Remove some more test suite cruft:
* localhostname from get_hostname was unused.
* database_name is no longer used except (misleadingly) in kdb5_util
  output.
* admin_database_name and admin_database_lockfile are no longer used.
* default_domain is only used for v4->v5 principal conversion, which
  isn't tested.
* libkadm5's init-v2.exp had a copy of get_hostname; domain and
  localhostname from it were unused.



Changed Files:
U   trunk/src/lib/kadm5/unit-test/api.current/init-v2.exp
U   trunk/src/tests/dejagnu/config/default.exp
Modified: trunk/src/lib/kadm5/unit-test/api.current/init-v2.exp
===================================================================
--- trunk/src/lib/kadm5/unit-test/api.current/init-v2.exp	2010-02-27 09:49:32 UTC (rev 23758)
+++ trunk/src/lib/kadm5/unit-test/api.current/init-v2.exp	2010-02-28 20:32:00 UTC (rev 23759)
@@ -9,10 +9,8 @@
 proc get_hostname { } {
     global RESOLVE
     global hostname
-    global localhostname
-    global domain
 
-    if {[info exists hostname] && [info exists localhostname]} {
+    if {[info exists hostname]} {
 	return 1
     }
 
@@ -30,12 +28,9 @@
     }
     close $file
     catch "exec rm -f myname" exec_output
-    regexp "^(\[^.\]*)\.(.*)$" $hostname foo localhostname domain
 
     set hostname [string tolower $hostname]
-    set localhostname [string tolower $localhostname]
-    set domain [string tolower $domain]
-    verbose "hostname: $hostname; localhostname: $localhostname; domain $domain"
+    verbose "hostname: $hostname"
 
     return 1
 }

Modified: trunk/src/tests/dejagnu/config/default.exp
===================================================================
--- trunk/src/tests/dejagnu/config/default.exp	2010-02-27 09:49:32 UTC (rev 23758)
+++ trunk/src/tests/dejagnu/config/default.exp	2010-02-28 20:32:00 UTC (rev 23759)
@@ -640,17 +640,16 @@
 
 # get_hostname
 # This procedure will get the local hostname.  It sets the global
-# variables hostname (the full name) and localhostname (the first part
-# of the name).  Returns 1 on success, 0 on failure.
+# variables hostname (the full name) and domain (all but the first
+# part of the name).  Returns 1 on success, 0 on failure.
 
 proc get_hostname { } {
     global RESOLVE
     global hostname
-    global localhostname
     global domain
     global tmppwd
 
-    if {[info exists hostname] && [info exists localhostname]} {
+    if {[info exists hostname]} {
 	return 1
     }
 
@@ -670,12 +669,11 @@
     }
     close $file
     file delete $tmppwd/hostname
-    regexp "^(\[^.\]*)\\.(.*)$" $hostname foo localhostname domain
+    regexp "^\[^.\]*\\.(.*)$" $hostname foo domain
 
     set hostname [string tolower $hostname]
-    set localhostname [string tolower $localhostname]
     set domain [string tolower $domain]
-    verbose "hostname: $hostname; localhostname: $localhostname; domain $domain"
+    verbose "hostname: $hostname; domain: $domain"
 
     return 1
 }
@@ -766,9 +764,6 @@
 	puts $conffile ""
 	puts $conffile "\[realms\]"
 	puts $conffile "	$REALMNAME = \{"
-#	puts $conffile "		database_name = $tmppwd/db"
-	puts $conffile "		admin_database_name = $tmppwd/adb"
-	puts $conffile "		admin_database_lockfile = $tmppwd/adb.lock"
 	# Testing with a colon in the name exercises default handling
 	# for pathnames.
 	puts $conffile "		key_stash_file = $tmppwd/stash:foo"
@@ -817,9 +812,6 @@
 	puts $conffile ""
 	puts $conffile "\[realms\]"
 	puts $conffile "	$REALMNAME = \{"
-#	puts $conffile "		database_name = $tmppwd/slave-db"
-	puts $conffile "		admin_database_name = $tmppwd/slave-adb"
-	puts $conffile "		admin_database_lockfile = $tmppwd/slave-adb.lock"
 	# Testing with a colon in the name exercises default handling
 	# for pathnames.
 	puts $conffile "		key_stash_file = $tmppwd/slave-stash"
@@ -946,7 +938,6 @@
 	puts $conffile "		kdc = $hostname:[expr 1 + $portbase]"
 	puts $conffile "		admin_server = $hostname:[expr 4 + $portbase]"
 	puts $conffile "		kpasswd_server = $hostname:[expr 5 + $portbase]"
-	puts $conffile "		default_domain = $domain"
 	puts $conffile "		database_module = foo_db2"
 	puts $conffile "	\}"
 	puts $conffile ""




More information about the cvs-krb5 mailing list