Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #645 from metacpan/oalders/fix-favorites-test
Fix failing favorites test
  • Loading branch information
ranguard committed May 14, 2017
2 parents 19f2dfa + c74f9fb commit 705f491
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 4 deletions.
10 changes: 10 additions & 0 deletions t/00_setup.t
Expand Up @@ -20,6 +20,16 @@ use Path::Class qw(dir file);
use Test::More 0.96;
use URI::FromHash qw( uri );

BEGIN {
# We test parsing bad YAML. This attempt emits a noisy warning which is not
# helpful in test output, so we'll suppress it here.
$SIG{__WARN__} = sub {
my $msg = shift;
return if $msg =~ m{found a duplicate key};
warn $msg;
};
}

# Ensure we're starting fresh
my $tmp_dir = tmp_dir();
$tmp_dir->rmtree;
Expand Down
2 changes: 1 addition & 1 deletion t/release/ipsonar-0.29.t
Expand Up @@ -22,7 +22,7 @@ test_release(

# This is kind of a SKIP. This may be an actual bug which we want to
# investigate later.
tests => undef,
#tests => undef,
}
);

Expand Down
12 changes: 9 additions & 3 deletions t/server/controller/login/openid.t
Expand Up @@ -12,9 +12,15 @@ use Test::OpenID::Server;
use Test::Routine;
use Test::Routine::Util;

with qw(
MetaCPAN::Tests::UserAgent
);
with 'MetaCPAN::Tests::UserAgent';

BEGIN {
$SIG{__WARN__} = sub {
my $msg = shift;
return if $msg =~ m{NEXT};
warn $msg;
};
}

my $openid_server = Test::OpenID::Server->new;
my $url = $openid_server->started_ok('start server');
Expand Down
6 changes: 6 additions & 0 deletions t/testrules.yml
@@ -1,5 +1,11 @@
---
seq:
- seq: t/0*.t

# If t/server/controller/user/favorite.t this runs too late then the
# looks_human test will fail. We should probably reset the user data, but
# this is a quicker fix for now.

- seq: t/server/controller/user/favorite.t
- par:
- t/**.t

0 comments on commit 705f491

Please sign in to comment.