diff --git a/xCAT-test/unit/blade_findme_dispatch.t b/xCAT-test/unit/blade_findme_dispatch.t index 39133a86b..0cd4559f7 100644 --- a/xCAT-test/unit/blade_findme_dispatch.t +++ b/xCAT-test/unit/blade_findme_dispatch.t @@ -9,9 +9,16 @@ use lib File::Spec->catdir( $FindBin::Bin, '..', '..', 'xCAT-server', 'lib', 'perl' ); use xCAT::BladeUtils; +my $shared_discovery_helper = eval { + require xCAT::DiscoveryUtils; + xCAT::DiscoveryUtils->can('findme_request_for_handler'); +}; + sub entry_for { my ($req) = @_; - return xCAT::BladeUtils::findme_request_for_handler($req); + return $shared_discovery_helper + ? xCAT::DiscoveryUtils::findme_request_for_handler($req) + : xCAT::BladeUtils::findme_request_for_handler($req); } # This is the request a booting node sends: a command and its own details, and