Skip to content

Commit c5ce360

Browse files
committed
Fix some test issues
1 parent 8e3e162 commit c5ce360

File tree

4 files changed

+11
-2
lines changed

4 files changed

+11
-2
lines changed

lib/App/Yath/Server.pm

+2-2
Original file line numberDiff line numberDiff line change
@@ -129,11 +129,11 @@ sub start_ephemeral_db {
129129

130130
my $db = DBIx::QuickDB->build_db(harness_ui => $qdb_args);
131131
unless($schema_type) {
132-
if (ref($db) =~ m/::(PostgreSQL|MySQL)$/) {
132+
if (ref($db) =~ m/::(PostgreSQL|MariaDB|Percona|SQLite|MySQL)$/) {
133133
$schema_type = $1;
134134
}
135135
else {
136-
die "$db does not look like PostgreSQL or MySQL";
136+
die "$db does not look like PostgreSQL, Percona, MariaDB, SQLite or MySQL";
137137
}
138138
}
139139

t/0-load_all.t

+5
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,11 @@ sub wanted {
4747

4848
my $ok = eval { local $SIG{__WARN__} = sub { push @warnings => @_ }; require($file); 1 };
4949
my $err = $@;
50+
if ($err =~ m/^Can't locate / || $err =~ m/version \S+ required--this is only version/) {
51+
skip_all $err;
52+
return;
53+
}
54+
5055
{
5156
no warnings 'once';
5257
ok($ok, "require $file (" . ($App::Yath::Schema::LOADED // 'undef') . ")", $ok ? () : $err);

t/integration/coverage-ui.t

+3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
use Test2::Plugin::IsolateTemp;
22
use Test2::V0;
33

4+
use Test2::Tools::QuickDB;
5+
46
use Test2::Harness::Util::JSON qw/encode_json decode_json/;
57
use Test2::Require::Module 'Test2::Plugin::Cover' => '0.000022';
68

@@ -17,6 +19,7 @@ $dir =~ s{^\./}{};
1719
$dir =~ s/\d+$//;
1820
$dir =~ s{-ui}{}g;
1921

22+
skipall_unless_can_db();
2023
my $config = App::Yath::Schema::Config->new(ephemeral => 'Auto');
2124
my $server = App::Yath::Server->new(schema_config => $config);
2225
my $db = $server->start_ephemeral_db;

t/unit/Test2/Harness/Reloader/Inotify2.t

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
use Test2::Require::Module 'Linux::Inotify2';
12
use Test2::V0 -target => 'Test2::Harness::Reloader::Inotify2';
23

34
skip_all "write me";

0 commit comments

Comments
 (0)