App-opan
view release on metacpan or search on metacpan
Changes
maint/Makefile.PL.include
Makefile.PL
MANIFEST This list of files
script/opan
t/fix/AAAAAAAAA-1.00.tar.gz
t/fix/AAAAAAAAA-1.01.tar.gz
t/fix/empty.index
t/fix/M-1.000001.tar.gz
t/fix/M-1.tar.gz
t/fix/upstream.fragment
t/help.t
t/pan.t
t/upload.t
xt/ext.t
META.yml Module YAML meta-data (added by MakeMaker)
META.json Module JSON meta-data (added by MakeMaker)
README README file (added by Distar)
LICENSE LICENSE file (added by Distar)
lib/App/opan.pm lib/App/opan.pm file (added by Distar)
}
$app->ua->server->app(my $fakepan = Mojolicious->new);
$fakepan->log->level('fatal');
$fakepan->routes->tap(sub {
$_[0]->get('/fakepan/modules/02packages.details.txt.gz' => sub {
$_[0]->render(data =>
scalar IPC::System::Simple::capture(
gzip => '-c', $test_cwd.'/t/fix/upstream.fragment'
)
);
});
foreach my $f (map "AAAAAAAAA-1.0${_}.tar.gz", qw(0 1)) {
$_[0]->get("/fakepan/authors/id/M/MS/MSCHWERN/${f}" => sub {
$_[0]->reply->asset(
Mojo::Asset::File->new(
path => $test_cwd.'/t/fix/'.$f
)
);
});
}
});
run('init');
is(
slurp($tempdir.'/pans/upstream/index'),
slurp('t/fix/upstream.fragment'),
'init fetch ok'
);
foreach my $pan (qw(pinset custom)) {
is(
slurp($tempdir."/pans/${pan}/index"),
slurp('t/fix/empty.index'),
"index for ${pan} initialized ok"
);
( run in 1.598 second using v1.01-cache-2.11-cpan-b16cb0d3907 )