diff --git a/t/db_dependent/selenium/00-onboarding.t b/t/db_dependent/selenium/00-onboarding.t index 61ee44c471..063653456f 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 ba442117ca..f8d197b6b4 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 $@; }