From 875f7d764d631e9e409af3ea1efc85d471f03d76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vin=C3=ADcius=20Ferr=C3=A3o?= <2031761+viniciusferrao@users.noreply.github.com> Date: Tue, 25 Aug 2026 19:33:08 -0300 Subject: [PATCH] test(discovery): prepare shared findme helper loading --- xCAT-test/unit/blade_findme_dispatch.t | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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