Closed jrafanie closed 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?
@axilleas this is related to the testing you brought up in #112. VCR is one way to test this.
@jrafanie thanks :) I know vcr but didn't have the chance to use it. +1 in adding this to the testing suite.
Nice:).
@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.
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!
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
==
used in void context.==
used in void context.==
used in void context.==
used in void context.==
used in void context.==
used in void context.@jrafanie First time using vcr so not familiar w/ some of specifics, but tried it out and looks good.
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.