ManageIQ / polisher

Polisher is a Ruby module and set of utilities aimed to assisting the post-publishing packaging process for Ruby gems and applications.
MIT License
14 stars 14 forks source link

Add vcr testing to fix koji diff not using latest package version #115

Closed jrafanie closed 10 years ago

jrafanie commented 10 years ago

Adding vcr enables testing and fixing a bug in Koji.diff:

Koji.diff should show the "latest" rpm version for each tag. Previously, the f19-ruby tag had rubygem-sinatra packages for 1.3.4 and 1.3.5 versions. Koji.diff reported 1.3.4 for the f19-ruby tag while most users would expect 1.3.5.

jrafanie commented 10 years ago

cc @movitto @strzibny Similar to #111 in that the response from Koji isn't required to be in version order.

Note, this adds dependencies but VCR could be really useful for testing the various interactions we do in polisher.

Is there a smaller brew tag I should be using in fedora for the VCR cassettes and specs?

jrafanie commented 10 years ago

@axilleas this is related to the testing you brought up in #112. VCR is one way to test this.

coveralls commented 10 years ago

Coverage Status

Coverage increased (+0.79%) when pulling cb7ac9f57824a93b54c8c133f87915f778279c9c on jrafanie:add_vcr_testing_to_fix_koji_diff into 23108cb844167a51d6a543025c87a22d0904409c on ManageIQ:master.

axilleas commented 10 years ago

@jrafanie thanks :) I know vcr but didn't have the chance to use it. +1 in adding this to the testing suite.

strzibny commented 10 years ago

Nice:).

jrafanie commented 10 years ago

@movitto thoughts? Don't merge yet, I'd like to see if I can fix the Polisher::Git::Pkg#build_srpm doing a GET https://rubygems.org/gems/-.gem to instead use a VCR cassette so I can force c.allow_http_connections_when_no_cassette = false to ensure http connections use vcr cassettes.

jrafanie commented 10 years ago

Ok @movitto. I managed to fix the Fix Polisher::Git::Pkg#build_srpm making a GET to rubygems.org, so now we can force all http connections during the specs to require VCR cassettes.

Please review. Thanks!

miq-bot commented 10 years ago

Checked commits https://github.com/jrafanie/polisher/commit/e3f83b25db4cc4e782ab017f2f8dd3a464478526 .. https://github.com/jrafanie/polisher/commit/6da4a291f7fa2472e91bb052b83fe3c7ed58d898 with rubocop 0.21.0 4 files checked, 6 offenses detected

spec/koji_spec.rb

coveralls commented 10 years ago

Coverage Status

Coverage increased (+0.63%) when pulling 6da4a291f7fa2472e91bb052b83fe3c7ed58d898 on jrafanie:add_vcr_testing_to_fix_koji_diff into 906acb0e69c2ba4742de41df0b4e5b1e74d531b8 on ManageIQ:master.

movitto commented 10 years ago

@jrafanie First time using vcr so not familiar w/ some of specifics, but tried it out and looks good.