Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revdep test file #90

Closed
wants to merge 2 commits into from
Closed

Revdep test file #90

wants to merge 2 commits into from

Conversation

stevieb9
Copy link

spek@sequoia ~/repos/metacpan-client $ perl t/api/reverse_dependencies.t 
1..45
ok 1 - An object of class 'MetaCPAN::Client' isa 'MetaCPAN::Client'
ok 2 - MetaCPAN::Client->can('reverse_dependencies')
ok 3 - MetaCPAN::Client->can('rev_deps')
ok 4 - An object of class 'MetaCPAN::Client::ResultSet' isa 'MetaCPAN::Client::ResultSet'
ok 5 - ResultSet->next with Test-Kwalitee-Extra is ok
ok 6 - ResultSet->next with Catmandu-Importer-CPAN is ok
ok 7 - ResultSet->next with Git-Helpers is ok
ok 8 - ResultSet->next with Test-BrewBuild is ok
ok 9 - ResultSet->next with App-CPAN-Dependents is ok
ok 10 - ResultSet->next with CPAN-Releases-Latest is ok
ok 11 - ResultSet->next with OrePAN2 is ok
ok 12 - ResultSet->next with Git-CPAN-Patch is ok
ok 13 - ResultSet->next with App-AcmeCpanauthors is ok
ok 14 - ResultSet->next with App-wordlist is ok
ok 15 - ResultSet->next with App-GamesWordlist is ok
ok 16 - ResultSet->next with App-ListRevDeps is ok
ok 17 - ResultSet->next with App-Magpie is ok
ok 18 - ResultSet->next with Test-DependentModules is ok
ok 19 - ResultSet->next with App-AllMyChangesUtils is ok
ok 20 - ResultSet->next with MetaCPAN-Helper is ok
ok 21 - ResultSet->next with App-cpanthanks is ok
ok 22 - ResultSet->next with App-CPANRepo is ok
ok 23 - ResultSet->next with App-Midgen is ok
ok 24 - ResultSet->next with ExtUtils-BundleMaker is ok
ok 25 - revdep count for MetaCPAN::Client seems ok
ok 26 - Test::Kwalitee::Extra is a valid reverse dependency
ok 27 - Catmandu::Importer::CPAN is a valid reverse dependency
ok 28 - Git::Helpers is a valid reverse dependency
ok 29 - Test::BrewBuild is a valid reverse dependency
ok 30 - App::CPAN::Dependents is a valid reverse dependency
ok 31 - CPAN::Releases::Latest is a valid reverse dependency
ok 32 - OrePAN2 is a valid reverse dependency
ok 33 - Git::CPAN::Patch is a valid reverse dependency
ok 34 - App::AcmeCpanauthors is a valid reverse dependency
ok 35 - App::wordlist is a valid reverse dependency
ok 36 - App::GamesWordlist is a valid reverse dependency
ok 37 - App::ListRevDeps is a valid reverse dependency
ok 38 - App::Magpie is a valid reverse dependency
ok 39 - Test::DependentModules is a valid reverse dependency
ok 40 - App::AllMyChangesUtils is a valid reverse dependency
ok 41 - MetaCPAN::Helper is a valid reverse dependency
ok 42 - App::cpanthanks is a valid reverse dependency
ok 43 - App::CPANRepo is a valid reverse dependency
ok 44 - App::Midgen is a valid reverse dependency
ok 45 - ExtUtils::BundleMaker is a valid reverse dependency

@mickeyn
Copy link
Contributor

mickeyn commented Jun 26, 2017

hi @stevieb9 , can you please squash the 2 commits into 1?

can_ok( $mc, 'reverse_dependencies' );
can_ok( $mc, 'rev_deps' );

# isa_ok( $dist, 'MetaCPAN::Client::Distribution' );
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you please remove this line?


my $rs = $mc->reverse_dependencies($module);

isa_ok $rs, 'MetaCPAN::Client::ResultSet';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please use parenthesis (you use them for can_ok above and the mixture of styles is confusing)

my @revdeps;

while (my $release = $rs->next){
is
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

parenthesis please

push @revdeps, $release->distribution;
}

is @revdeps > 2, 1, "revdep count for MetaCPAN::Client seems ok";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

1;
};

is $ok, 1, "$_ is a valid reverse dependency";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

@mickeyn
Copy link
Contributor

mickeyn commented Aug 11, 2017

poke

@stevieb9
Copy link
Author

stevieb9 commented Aug 11, 2017 via email

@mickeyn
Copy link
Contributor

mickeyn commented Nov 18, 2017

hi, closing this until it's ready

@mickeyn mickeyn closed this Nov 18, 2017
xsawyerx added a commit that referenced this pull request Jan 3, 2018
This is a recreation of PR #90.

I have fixed up the styling and cleaned it up a bit. I couldn't find the
original repo that had this commit so I just copied it.

The original code was written by Steve Bertrand (@stevieb9).

I also removed the counting of the tests themselves because it seems to
be a fragile practice. We cannot control all of our reverse dependency
and any additional one uploaded to CPAN would break any existing
version until the counter is adjusted.

I would also note this test takes a few seconds to run. Any automatic CI
tsting would have to take that into account and monitored if it exceeds
the timeout for the entire testing suite.
@xsawyerx xsawyerx mentioned this pull request Jan 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants