Skip to content

Commit adada21

Browse files
committed
More tets fixes
1 parent c5ce360 commit adada21

File tree

4 files changed

+11
-3
lines changed

4 files changed

+11
-3
lines changed

Changes

+3
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
{{$NEXT}}
22

3+
- Fix some test issues
4+
- Include some needed modules when loading schema
5+
36
2.000000 2024-07-30 15:00:13-07:00 America/Los_Angeles (TRIAL RELEASE)
47

58
- NOTE: Backwords incompatible changes, plugins and renderers may need rewriting

t/0-load_all.t

+4-3
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,16 @@ sub wanted {
3939
my @warnings;
4040

4141
if ($file =~ m{(MySQL|PostgreSQL|SQLite)}) {
42-
ok(eval { require "App/Yath/Schema/$1.pm" }, "Load necessary schema '$1'", $@);
42+
my $schema = $1;
43+
eval { require "App/Yath/Schema/$schema.pm"; 1} or skip_all "Could not load $schema: $@";
4344
}
4445
elsif ($file =~ m{App/Yath/Schema\.pm$} || $file =~ m{Schema/(Overlay|Result)}) {
45-
ok(eval { require App::Yath::Schema::PostgreSQL }, "Load schema");
46+
eval { require App::Yath::Schema::SQLite; 1 } or skip_all "Could not load SQLite: $@";
4647
}
4748

4849
my $ok = eval { local $SIG{__WARN__} = sub { push @warnings => @_ }; require($file); 1 };
4950
my $err = $@;
50-
if ($err =~ m/^Can't locate / || $err =~ m/version \S+ required--this is only version/) {
51+
if ($err =~ m/^Can't locate / || $err =~ m/version \S+ required--this is only version/ || $err =~ m/must be installed/) {
5152
skip_all $err;
5253
return;
5354
}

t/UI/MySQL.t

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
use Test2::Require::Module 'DBD::mysql';
2+
use Test2::Require::Module 'DateTime::Format::MySQL';
13
use Test2::V0 -target => 'App::Yath::Schema::MySQL';
24

35
use ok $CLASS;

t/UI/PostgreSQL.t

+2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
use Test2::Require::Module 'DBD::Pg';
2+
use Test2::Require::Module 'DateTime::Format::Pg';
13
use Test2::V0 -target => 'App::Yath::Schema::PostgreSQL';
24

35
use ok $CLASS;

0 commit comments

Comments
 (0)