Skip to content

Commit

Permalink
indexer tests: more conversion to assert_index_updated
Browse files Browse the repository at this point in the history
  • Loading branch information
rjbs committed May 19, 2024
1 parent 5c7f54a commit a93f87e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 25 deletions.
18 changes: 3 additions & 15 deletions t/mldistwatch-misc.t
Original file line number Diff line number Diff line change
Expand Up @@ -582,11 +582,7 @@ subtest "do not index dists without trial versions" => sub {

my $result = $pause->test_reindex;

$pause->file_not_updated_ok(
$result->tmpdir
->file(qw(cpan modules 02packages.details.txt.gz)),
"there were no things to update",
);
$result->assert_index_not_updated;

$result->logged_event_like(
qr{\Qdist is a developer release},
Expand All @@ -604,11 +600,7 @@ subtest "updates to existing packages " => sub {

my $result = $pause->test_reindex;

$pause->file_updated_ok(
$result->tmpdir
->file(qw(cpan modules 02packages.details.txt.gz)),
"index updated",
);
$result->assert_index_updated;

$result->package_list_ok([
{ package => 'Eye::Meeter', version => '1.234' },
Expand All @@ -620,11 +612,7 @@ subtest "updates to existing packages " => sub {

my $result = $pause->test_reindex;

$pause->file_updated_ok(
$result->tmpdir
->file(qw(cpan modules 02packages.details.txt.gz)),
"index updated",
);
$result->assert_index_updated;

$result->package_list_ok([
{ package => 'Eye::Meeter', version => '1.235' },
Expand Down
12 changes: 2 additions & 10 deletions t/mldistwatch-perl.t
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,7 @@ subtest "reject perl by unauthorized user" => sub {

my $result = $pause->test_reindex;

$pause->file_not_updated_ok(
$result->tmpdir
->file(qw(cpan modules 02packages.details.txt.gz)),
"there were no things to update",
);
$result->assert_index_not_updated;

$result->logged_event_like(
qr{\Qperl dist O/OP/OPRIME/perl-5.56.55.tar.gz from untrusted user OPRIME},
Expand Down Expand Up @@ -172,11 +168,7 @@ subtest "indexing a new perl, but file is not a proper tar.gz" => sub {

my $result = $pause->test_reindex;

$pause->file_not_updated_ok(
$result->tmpdir
->file(qw(cpan modules 02packages.details.txt.gz)),
"there were no things to update",
);
$result->assert_index_not_updated;

$result->logged_event_like(
qr{\Qcould not untar O/OP/OPRIME/perl-5.56.55.tar.gz},
Expand Down

0 comments on commit a93f87e

Please sign in to comment.