Skip to content

Commit

Permalink
Merge pull request #497 from RotherOSS/issue-496-hostname
Browse files Browse the repository at this point in the history
Issue #496: use Sys::Hostname instead of FQDN
  • Loading branch information
bschmalhofer authored Sep 30, 2020
2 parents c7cdfc6 + 68fe3fa commit 5023d65
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Kernel/System/UnitTest.pm
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ package Kernel::System::UnitTest;

use strict;
use warnings;
use v5.24.0;
use v5.24;
use utf8;
use namespace::autoclean;

Expand All @@ -28,6 +28,7 @@ use Storable();
use Term::ANSIColor();
use TAP::Harness;
use List::Util qw(any);
use Sys::Hostname qw(hostname);

# CPAN modules

Expand Down Expand Up @@ -101,7 +102,7 @@ sub Run {
my $ConfigObject = $Kernel::OM->Get('Kernel::Config');
my $Home = $ConfigObject->Get('Home');
my $Product = join ' ', $ConfigObject->Get('Product'), $ConfigObject->Get('Version');
my $Host = $ConfigObject->Get('FQDN');
my $Host = hostname();

# run tests in a subdir when requested
my $Directory = "$Home/scripts/test";
Expand Down Expand Up @@ -211,7 +212,7 @@ sub Run {
}

say sprintf
'ran tests for product %s on %s',
'ran tests for product %s on host %s .',
$Self->_Color( 'yellow', $Product ),
$Self->_Color( 'yellow', $Host );

Expand Down

0 comments on commit 5023d65

Please sign in to comment.