From 29ce341275e37f61308c90bc1f789403ddd70ee4 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 28 Jul 2025 10:38:27 +0200 Subject: [PATCH] Bug 40444: Fix onboarding and installer selenium tests --- t/db_dependent/selenium/00-onboarding.t | 4 ++++ t/db_dependent/selenium/01-installation.t | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/t/db_dependent/selenium/00-onboarding.t b/t/db_dependent/selenium/00-onboarding.t index 61ee44c4714..063653456f2 100755 --- a/t/db_dependent/selenium/00-onboarding.t +++ b/t/db_dependent/selenium/00-onboarding.t @@ -59,6 +59,9 @@ SKIP: { skip "Tests won't run if the database does not exist", 2 if $@; { + # Ignore expected warnings + # DBD::mysql::db do failed: Table 'koha_kohadev.systempreferences' doesn't exist + local $SIG{__WARN__} = sub { }; my $dup_err; local *STDERR; open STDERR, ">>", \$dup_err; @@ -67,6 +70,7 @@ SKIP: { SELECT * FROM systempreferences WHERE 1 = 0 | ); close STDERR; + if ($dup_err) { skip "Tests won't run if the database is not empty", 2 if $@; } diff --git a/t/db_dependent/selenium/01-installation.t b/t/db_dependent/selenium/01-installation.t index ba442117ca8..f8d197b6b46 100755 --- a/t/db_dependent/selenium/01-installation.t +++ b/t/db_dependent/selenium/01-installation.t @@ -60,6 +60,9 @@ SKIP: { skip "Tests won't run if the database does not exist", 3 if $@; { + # Ignore expected warnings + # DBD::mysql::db do failed: Table 'koha_kohadev.systempreferences' doesn't exist + local $SIG{__WARN__} = sub { }; my $dup_err; local *STDERR; open STDERR, ">>", \$dup_err; @@ -68,6 +71,7 @@ SKIP: { SELECT * FROM systempreferences WHERE 1 = 0 | ); close STDERR; + if ($dup_err) { skip "Tests won't run if the database is not empty", 2 if $@; } -- 2.34.1