Skip to content

Commit 16006dc

Browse files
committed
test: Fix mssql test on windows running on GH
1 parent dda6e15 commit 16006dc

File tree

1 file changed

+2
-2
lines changed
  • lib/GLPI/Agent/Task/Inventory/Generic/Databases

1 file changed

+2
-2
lines changed

lib/GLPI/Agent/Task/Inventory/Generic/Databases/MSSQL.pm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,8 @@ sub _getDatabaseService {
4343

4444
# Handle default credentials case
4545
if (@{$credentials} == 1 && !keys(%{$credentials->[0]})) {
46-
# On windows, we can discover instance names in registry
47-
if (OSNAME eq 'MSWin32') {
46+
# On windows, we can discover instance names in registry but not during tests
47+
if (OSNAME eq 'MSWin32' && !$params{istest}) {
4848
GLPI::Agent::Tools::Win32->require();
4949
my $instances = GLPI::Agent::Tools::Win32::getRegistryKey(
5050
path => 'HKEY_LOCAL_MACHINE/SOFTWARE/Microsoft/Microsoft SQL Server/Instance Names/SQL',

0 commit comments

Comments
 (0)