From 25ee8ca2c34952fd79d6ebc882216442f4a11c43 Mon Sep 17 00:00:00 2001 From: Russ Allbery Date: Sat, 1 Sep 2007 04:14:28 +0000 Subject: 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. --- perl/t/keytab.t | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'perl') 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); -- cgit v1.2.3