summaryrefslogtreecommitdiffstats
path: root/src/kadmin/import/unit-test
diff options
context:
space:
mode:
authorTheodore Tso <tytso@mit.edu>1996-09-11 20:38:17 +0000
committerTheodore Tso <tytso@mit.edu>1996-09-11 20:38:17 +0000
commitc345ae24c280496d0cb3acfa96258c7dbfeb25f2 (patch)
tree42f265a0aab4e417d6973e78a860004693260508 /src/kadmin/import/unit-test
parent5703cfe7cdaeb9e8d21a8dba5993c96a48037cf6 (diff)
downloadkrb5-c345ae24c280496d0cb3acfa96258c7dbfeb25f2.tar.gz
krb5-c345ae24c280496d0cb3acfa96258c7dbfeb25f2.tar.xz
krb5-c345ae24c280496d0cb3acfa96258c7dbfeb25f2.zip
Remove the kadmin/import and kadmin/export directories since the are
subsumed by kdb5_util. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@9080 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/kadmin/import/unit-test')
-rw-r--r--src/kadmin/import/unit-test/Makefile.ov9
-rw-r--r--src/kadmin/import/unit-test/config/unix.exp36
-rw-r--r--src/kadmin/import/unit-test/helpers.exp93
-rw-r--r--src/kadmin/import/unit-test/import.0/usage.exp23
-rw-r--r--src/kadmin/import/unit-test/valid_export_file27
5 files changed, 0 insertions, 188 deletions
diff --git a/src/kadmin/import/unit-test/Makefile.ov b/src/kadmin/import/unit-test/Makefile.ov
deleted file mode 100644
index c7ac33c0b..000000000
--- a/src/kadmin/import/unit-test/Makefile.ov
+++ /dev/null
@@ -1,9 +0,0 @@
-#
-# $Id$
-#
-
-TOP = ../..
-include $(TOP)/config.mk/template
-
-unit-test::
- $(RUNTEST) IMPORT=../ovsec_adm_import --tool import
diff --git a/src/kadmin/import/unit-test/config/unix.exp b/src/kadmin/import/unit-test/config/unix.exp
deleted file mode 100644
index af4ff443e..000000000
--- a/src/kadmin/import/unit-test/config/unix.exp
+++ /dev/null
@@ -1,36 +0,0 @@
-#
-# import_version -- extract and print the version number of import
-#
-
-proc import_version {} {
- global IMPORT
- set tmp [exec ident $IMPORT]
- if [regexp {Header: .*import.c,v ([0-9]+\.[0-9]+)} $tmp \
- dummy version] then {
- clone_output "$IMPORT version $version\n"
- } else {
- clone_output "$IMPORT version <unknown>\n"
- }
-}
-#
-# import_load -- loads the program
-#
-proc import_load {} {
- #
-}
-
-# import_exit -- clean up and exit
-proc import_exit {} {
- #
-}
-
-#
-# import_start -- start import running
-#
-proc import_start { args } {
- global IMPORT
- global spawn_id
-
- verbose "% $IMPORT $args" 1
- eval spawn $IMPORT $args
-}
diff --git a/src/kadmin/import/unit-test/helpers.exp b/src/kadmin/import/unit-test/helpers.exp
deleted file mode 100644
index 5905614e7..000000000
--- a/src/kadmin/import/unit-test/helpers.exp
+++ /dev/null
@@ -1,93 +0,0 @@
-#
-# $Id$
-#
-
-proc myfail { comment } {
- global mytest_name
- global mytest_status
- wait
- fail "$mytest_name: $comment"
- set mytest_status 1
-}
-
-proc mypass {} {
-}
-
-##
-## When you expect on an id, and eof is detected, the spawn_id is closed.
-## It may be waited for, but calling expect or close on this id is an ERROR!
-##
-
-proc mytest { name kpargs status args } {
- global spawn_id
- global timeout
- global mytest_name
- global mytest_status
-
- verbose "starting test: $name"
-
- set mytest_name "$name"
-
- eval import_start $kpargs
-
- # at the end, eof is success
-
- lappend args { eof { if {[regexp "\[\r\n\]$" $expect_out(buffer)] == 0} { myfail "final status message not newline-terminated" } } }
-
- # for each test argument....
- # rep invariant: when this foreach ends, the id is close'd, but
- # not wait'ed.
-
- foreach test $args {
- set mytest_status 0
-
- # treat the arg as an expect parameter
- # if failure, the process will be closed and waited.
-
- uplevel 1 "expect {
- $test
- timeout { close; myfail \"timeout\"}
- eof { myfail \"eof read before expected message string\" }
- }"
-
- if {$mytest_status == 1} { return }
- }
-
- # at this point, the id is closed and we can wait on it.
-
- set ret [wait]
- verbose "% Exit $ret" 1
- if {[lindex $ret 0] == -1} {
- fail "$name: wait returned error [lindex $ret 1]"
- } else {
- if { ((![string compare $status zero]) &&
- ([lindex $ret 1] == 0)) ||
- ((![string compare $status nonzero]) &&
- ([lindex $ret 1] != 0)) } {
- pass "$name"
- } else {
- fail "$name: unexpected return status [lindex $ret 1], should be $status"
- }
- }
-}
-
-proc import_win { name args } {
- mytest "$name" "$args" zero {
- -re "Successfully imported \[0-9\]+ records."
- { mypass }
- eof
- { myfail "error: $expect_out(buffer)" }
- }
-}
-
-proc import_lose { name args error } {
- mytest "$name" "$args" nonzero {
- -re "Successfully imported \[0-9\]+ records."
- { myfail "unexpected success" }
- -re "ovsec_adm_import: .*$error"
- { mypass }
- eof
- { myfail "error: $expect_out(buffer)" }
- }
-}
-
diff --git a/src/kadmin/import/unit-test/import.0/usage.exp b/src/kadmin/import/unit-test/import.0/usage.exp
deleted file mode 100644
index 8e82f5a21..000000000
--- a/src/kadmin/import/unit-test/import.0/usage.exp
+++ /dev/null
@@ -1,23 +0,0 @@
-#
-# $Id$
-#
-
-set timeout 5
-
-load_lib "helpers.exp"
-
-#
-# Here are the tests
-#
-
-import_lose "C.6: input file not readable" /foo/bar/baz \
- "No such file or directory while opening input file"
-
-import_lose "C.7: two arguments" {foo bar} \
- "Usage:"
-
-system {rm -rf /krb5}
-
-import_lose "C.2: /krb5 doesn't exist" ./valid_export_file \
- "Secure administration database lock file missing while importing"
-
diff --git a/src/kadmin/import/unit-test/valid_export_file b/src/kadmin/import/unit-test/valid_export_file
deleted file mode 100644
index dad19c874..000000000
--- a/src/kadmin/import/unit-test/valid_export_file
+++ /dev/null
@@ -1,27 +0,0 @@
-OpenV*Secure V1.0 Tue Dec 21 14:18:18 1993
-policy test-pol 0 10000 8 2 3 1
-policy dict-only 0 0 1 1 1 1
-policy once-a-min 30 0 1 1 1 1
-policy test-pol-nopw 0 0 1 1 1 2
-princ admin/delete@SECURE-TEST.OV.COM 0 0 0 0
-princ test3@SECURE-TEST.OV.COM 0 0 0 0
-princ admin/modify@SECURE-TEST.OV.COM 0 0 0 0
-princ ovsec_adm/changepw@SECURE-TEST.OV.COM 0 0 0 0
-princ test2@SECURE-TEST.OV.COM 0 0 0 0
-princ admin/pol@SECURE-TEST.OV.COM test-pol-nopw 800 0 0 0
-princ admin/rename@SECURE-TEST.OV.COM 0 0 0 0
-princ test1@SECURE-TEST.OV.COM 0 0 0 0
-princ krbtgt/SECURE-TEST.OV.COM@SECURE-TEST.OV.COM 0 0 0 0
-princ pol3@SECURE-TEST.OV.COM dict-only 800 0 0 0
-princ admin/get-pol@SECURE-TEST.OV.COM test-pol-nopw 800 0 0 0
-princ admin/none@SECURE-TEST.OV.COM 0 0 0 0
-princ testuser@SECURE-TEST.OV.COM 0 0 0 0
-princ pol2@SECURE-TEST.OV.COM once-a-min 800 0 0 0
-princ K/M@SECURE-TEST.OV.COM 0 0 0 0
-princ pol1@SECURE-TEST.OV.COM test-pol 800 0 0 0
-princ ovsec_adm/history@SECURE-TEST.OV.COM 0 0 0 0
-princ admin@SECURE-TEST.OV.COM 0 0 0 0
-princ admin/add@SECURE-TEST.OV.COM 0 0 0 0
-princ admin/get@SECURE-TEST.OV.COM 0 0 0 0
-princ ovsec_adm/admin@SECURE-TEST.OV.COM 0 0 0 0
-End of Database 25 records