[Bps-public-commit] r14898 - Pushmi/trunk/t
clkao at bestpractical.com
clkao at bestpractical.com
Thu Aug 7 15:04:42 EDT 2008
Author: clkao
Date: Thu Aug 7 15:04:40 2008
New Revision: 14898
Modified:
Pushmi/trunk/t/auth-relayed.t
Log:
pass auth-relayed.
Modified: Pushmi/trunk/t/auth-relayed.t
==============================================================================
--- Pushmi/trunk/t/auth-relayed.t (original)
+++ Pushmi/trunk/t/auth-relayed.t Thu Aug 7 15:04:40 2008
@@ -11,7 +11,7 @@
BEGIN { check_apache }
plan skip_all => 'mod_perl required' unless eval { require ModPerl::Config; 1 };
-plan tests => 7;
+plan tests => 9;
use File::Spec::Functions qw(rel2abs catdir catfile);
@@ -84,26 +84,34 @@
diag $perlbal_url;
run_pushmi('mirror', $slavedepot->repospath, $master_url);
-system('svn', 'mkdir', '--non-interactive', '--no-auth-cache', '--username' => 'mirror', '--password' => 'secret', -m => 'mkdir', "$master_url/X");
-run_pushmi('sync', $slavedepot->repospath);
+
+is_svn_output(['mkdir', '--non-interactive', '--no-auth-cache', '--username' => 'mirror', '--password' => 'secret', -m => 'mkdir', "$master_url/X"],
+ ['','Committed revision 3.'], []);
my ($copath, $corpath) = get_copath('auth-relayed-svn');
-system("svn ls $perlbal_url/A");
+run_pushmi('sync', $slavedepot->repospath);
+
+is_svn_output(['ls', "$perlbal_url/A"],
+ ['Q/', 'be'], []);
is_svn_output(['co', '--non-interactive', '--no-auth-cache', "$perlbal_url/A", $copath],
['A t/checkout/auth-relayed-svn/Q',
'A t/checkout/auth-relayed-svn/Q/qu',
'A t/checkout/auth-relayed-svn/Q/qz',
'A t/checkout/auth-relayed-svn/be',
- 'Checked out revision 3.']);
+ 'Checked out revision 3.'], []);
+
+my $reason = $SVN::Core::VERSION lt '1.6.0'
+ ? ''
+ : ": Could not authenticate to server: rejected Basic challenge";
is_svn_output(['mkdir', '--non-interactive', '--no-auth-cache', -m => 'mkdir', "$perlbal_url/X/orzzzz"],
[],
- [qr{svn: MKACTIVITY of '/svn/\!svn/act/.*': authorization failed \(http://localhost:$perlbal_port\)}]);
+ [qr{svn: MKACTIVITY of '/svn/\!svn/act/.*': authorization failed$reason \(http://localhost:$perlbal_port\)}]);
is_svn_output(['mkdir', '--non-interactive', '--no-auth-cache', '--username' => 'test', '--password' => 'wrong', -m => 'mkdir', "$perlbal_url/X/orzzzz"],
[],
- [qr{svn: MKACTIVITY of '/svn/\!svn/act/.*': authorization failed \(http://localhost:$perlbal_port\)}]);
+ [qr{svn: MKACTIVITY of '/svn/\!svn/act/.*': authorization failed$reason \(http://localhost:$perlbal_port\)}]);
is_svn_output(['mkdir', '--non-interactive', '--no-auth-cache', '--username' => 'test', '--password' => 'test', -m => 'mkdir', "$perlbal_url/X/orzzzz"],
['','Committed revision 4.']);
More information about the Bps-public-commit
mailing list