summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuss Allbery <rra@stanford.edu>2007-09-01 04:14:28 +0000
committerRuss Allbery <rra@stanford.edu>2007-09-01 04:14:28 +0000
commit25ee8ca2c34952fd79d6ebc882216442f4a11c43 (patch)
tree8bd165282a87697ecb697d4919c005d44996f15b
parent2ba39a2d812b5217230a4497433cf4332b30be49 (diff)
Add a test for the download trace information. Do that in the keytab
test because that's the only place we can successfully run get right now.
-rw-r--r--TODO2
-rwxr-xr-xperl/t/keytab.t18
2 files changed, 17 insertions, 3 deletions
diff --git a/TODO b/TODO
index 139e178..3f72474 100644
--- a/TODO
+++ b/TODO
@@ -2,8 +2,6 @@
Required to replace leland_srvtab:
-* Fix and test downloaded trace information.
-
* Bring the design document up to date.
* Write a test suite for the sanity checking in wallet-backend and
diff --git a/perl/t/keytab.t b/perl/t/keytab.t
index cd5c332..360065d 100755
--- a/perl/t/keytab.t
+++ b/perl/t/keytab.t
@@ -3,7 +3,7 @@
#
# t/keytab.t -- Tests for the keytab object implementation.
-use Test::More tests => 37;
+use Test::More tests => 38;
use Wallet::Config;
use Wallet::Object::Keytab;
@@ -171,6 +171,22 @@ SKIP: {
ok (! -f "./keytab.$$", ' and the temporary file was cleaned up');
ok (valid ($data, 'wallet/one'), ' and the keytab is valid');
+ # For right now, this is the only backend type that we have for which we
+ # can do a get, so test display of the last download information.
+ my $show = $object->show;
+ $show =~ s/^(\s*(?:Created|Downloaded) on:) \d+$/$1 0/mg;
+ my $expected = <<"EOO";
+ Type: keytab
+ Name: wallet/one
+ Created by: $user
+ Created from: $host
+ Created on: 0
+ Downloaded by: $user
+Downloaded from: $host
+ Downloaded on: 0
+EOO
+ is ($show, $expected, 'Show output is correct');
+
# Test error handling on keytab retrieval.
undef $Wallet::Config::KEYTAB_TMP;
$data = $object->get (@trace);