summaryrefslogtreecommitdiffstats
path: root/t
diff options
context:
space:
mode:
Diffstat (limited to 't')
-rw-r--r--t/001compile.t14
-rw-r--r--t/002goodperl.t7
-rw-r--r--t/bmo/comments.t4
-rw-r--r--t/docker.t4
4 files changed, 15 insertions, 14 deletions
diff --git a/t/001compile.t b/t/001compile.t
index e81162056..3d8d82bf4 100644
--- a/t/001compile.t
+++ b/t/001compile.t
@@ -35,7 +35,7 @@ sub compile_file {
my ($file) = @_;
# Don't allow CPAN.pm to modify the global @INC, which the version
- # shipped with Perl 5.8.8 does. (It gets loaded by
+ # shipped with Perl 5.8.8 does. (It gets loaded by
# Bugzilla::Install::CPAN.)
local @INC = @INC;
@@ -43,10 +43,6 @@ sub compile_file {
skip "$file: extensions not tested", 1;
return;
}
- if ($file =~ /ModPerl/) {
- skip "$file: ModPerl stuff not tested", 1;
- return;
- }
if ($file =~ s/\.pm$//) {
$file =~ s{/}{::}g;
@@ -82,7 +78,7 @@ my $file_features = map_files_to_features();
# Test the scripts by compiling them
foreach my $file (@testitems) {
# These were already compiled, above.
- next if ($file eq 'Bugzilla.pm'
+ next if ($file eq 'Bugzilla.pm'
or $file eq 'Bugzilla/Constants.pm'
or $file eq 'Bugzilla/Install/Requirements.pm');
SKIP: {
@@ -94,10 +90,10 @@ foreach my $file (@testitems) {
skip "$file: $feature not enabled", 1;
}
- # Check that we have a DBI module to support the DB, if this
+ # Check that we have a DBI module to support the DB, if this
# is a database module (but not Schema)
if ($file =~ m{Bugzilla/DB/([^/]+)\.pm$}
- and $file ne "Bugzilla/DB/Schema.pm")
+ and $file ne "Bugzilla/DB/Schema.pm")
{
my $module = lc($1);
Bugzilla->feature($module) or skip "$file: Driver for $module not installed", 1;
@@ -105,4 +101,4 @@ foreach my $file (@testitems) {
compile_file($file);
}
-}
+}
diff --git a/t/002goodperl.t b/t/002goodperl.t
index 5f201160b..80d7cf2b9 100644
--- a/t/002goodperl.t
+++ b/t/002goodperl.t
@@ -83,6 +83,7 @@ foreach my $file (@testitems) {
my $found_use_strict = 0;
my $found_use_warnings = 0;
my $found_modern_perl = 0;
+ my $found_mojo = 0;
$file =~ s/\s.*$//; # nuke everything after the first space (#comment)
next if (!$file); # skip null entries
@@ -92,13 +93,17 @@ foreach my $file (@testitems) {
}
while (my $file_line = <FILE>) {
$found_modern_perl = 1 if $file_line =~ m/^use\s*(?:Moo|Role::Tiny)/;
+ $found_mojo = 1 if $file_line =~ m/^use\s(?:Mojo(?:licious::Lite|::Base)\b)/;
$found_use_perl = 1 if $file_line =~ m/^\s*use 5.10.1/;
$found_use_strict = 1 if $file_line =~ m/^\s*use strict/;
$found_use_warnings = 1 if $file_line =~ m/^\s*use warnings/;
- if ($found_modern_perl) {
+ if ($found_modern_perl || $found_mojo) {
$found_use_strict = 1;
$found_use_warnings = 1;
}
+ if ($found_mojo) {
+ $found_use_perl = 1;
+ }
last if ($found_use_perl && $found_use_strict && $found_use_warnings);
}
close (FILE);
diff --git a/t/bmo/comments.t b/t/bmo/comments.t
index 4b0bb8177..00002040c 100644
--- a/t/bmo/comments.t
+++ b/t/bmo/comments.t
@@ -35,7 +35,7 @@ my $bug_1 = Bugzilla::Bug->create(
keywords => [],
cc => [],
comment => 'This is a brand new bug',
- assigned_to => 'nobody@mozilla.org',
+ assigned_to => Bugzilla->params->{'nobody_user'},
}
);
ok($bug_1->id, "got a new bug");
@@ -55,7 +55,7 @@ my $bug_2 = Bugzilla::Bug->create(
keywords => [],
cc => [],
comment => "This is related to ${urlbase}show_bug.cgi?id=$bug_1_id",
- assigned_to => 'nobody@mozilla.org',
+ assigned_to => Bugzilla->params->{'nobody_user'},
}
);
diff --git a/t/docker.t b/t/docker.t
index 3c8cd055b..c1f85088c 100644
--- a/t/docker.t
+++ b/t/docker.t
@@ -28,7 +28,7 @@ while (my $line = readline $dockerfile_fh) {
close $dockerfile_fh;
my ($image, $version) = split(/:/ms, $base, 2);
-is($image, 'mozillabteam/bmo-slim', "base image is mozillabteam/bmo-slim");
+is($image, 'bugzilla/harmony-slim', "base image is bugzilla/harmony-slim");
like($version, qr/\d{4}\d{2}\d{2}\.\d+/ms, "version is YYYYMMDD.x");
my $regex = qr{
@@ -49,4 +49,4 @@ while (my $line = readline $ci_config_fh) {
}
close $ci_config_fh;
-done_testing; \ No newline at end of file
+done_testing;