HealthCheck-Diagnostic-SSH
    
    
  
  
  
view release on metacpan or search on metacpan
t/HealthCheck-Diagnostic-SSH.t view on Meta::CPAN
    id     => 'ssh',
    label  => 'SSH',
    status => 'OK',
);
$hc = HealthCheck::Diagnostic::SSH->new( %default );
$res = $hc->check;
is $res, {
        %success_res,
        info   => "Successful connection for $user\@$host SSH",
    }, "Healthcheck completed using local user credentials";
# health check should fail with incorrect user overriden
$res = $hc->check( user => 'invalid-user' );
like $res->{info}, qr/invalid-user.*Permission denied/,
    "Healthcheck result displays overridden parameters";
is $res->{status}, 'CRITICAL',
    "Healthcheck fails with wrong user";
# health check displays the correct message and should pass as the previous
# override should not persist
( run in 0.506 second using v1.01-cache-2.11-cpan-c333fce770f )