From: Jennie 'Seven' Evers-Corvina Date: Mon, 13 Dec 2010 19:42:29 +0000 (-0800) Subject: okay, another hurdle, another reanalysis X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=553316163df03755087293ebb492d58505abe307;p=p5sagit%2FIPC-PerlSSH-MultiHop.git okay, another hurdle, another reanalysis --- diff --git a/t/scratch.t b/t/scratch.t index bec3196..484f6ec 100644 --- a/t/scratch.t +++ b/t/scratch.t @@ -61,7 +61,13 @@ $perlssh->eval( "use File::HomeDir" ); my $homedir2 = $perlssh->eval( 'File::HomeDir->my_home' ); is( $homedir2, "/home/test", 'got $ENV{HOME} the smart way' ); -my @test_hosts = [ 'stagetwo@localhost', 'stagethree@localhost' ]; +$perlssh->eval( 'chomp(my @env = `ssh-agent`); foreach (@env) { /^(.*?)=(.*)/; $ENV{$1} = $2; }' ); +$perlssh->eval( 'system("ssh-add")' ); + +my $test_ssh_env = $perlssh->eval( '$ENV{SSH_AUTH_SOCK}' ); +ok( defined $test_ssh_env, "SSH_AUTH_SOCK = $test_ssh_env" ); + +my @test_hosts = ( 'stagetwo@localhost', 'stagethree@localhost' ); my ($cmd2, $pssh2) = $pipc->_open_perlssh(@test_hosts); is( ref $pssh2, "IPC::PerlSSH", "\$pssh2 isa IPC::PerlSSH (via $cmd2)" );