Skip to content

Commit

Permalink
Merge pull request #838 from RobinSheps/VCRissue
Browse files Browse the repository at this point in the history
Record new VCR cassette
  • Loading branch information
agraul committed Aug 4, 2020
2 parents 4e9f71f + be3fc89 commit 6ee7da4
Show file tree
Hide file tree
Showing 8 changed files with 20,652 additions and 7,149 deletions.
10 changes: 4 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
sudo: required
dist: trusty
language: ruby
cache: bundler
addons:
firefox: latest
rvm:
- 2.5.7
- 2.6.5
- 2.7.0
- 2.5.8
- 2.6.6
- 2.7.1
before_install:
- gem install bundler
- gem install bundler:1.17.2
script:
- 'bundle exec rake rubocop'
- 'bundle exec rails test'
Expand Down
4 changes: 2 additions & 2 deletions config/options.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
defaults: &defaults
api_host: https://api.opensuse.org
api_username: wiki_hermes
api_password: w_h_p1
api_username: <%= ENV['API_USERNAME'] %>
api_password: <%= ENV['API_PASSWORD'] %>
relative_url_root:
development:
<<: *defaults
Expand Down
11 changes: 11 additions & 0 deletions test/integration/package_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,17 @@ def test_thumbnail_downloaded_uses_it
FileUtils.rm_f PKG_4PANE_THUMBNAIL
end

def test_thumbnail_not_downloaded_downloads_it
FileUtils.rm_f PKG_4PANE_THUMBNAIL
VCR.use_cassette('default') do
get '/package/thumbnail/4pane.png'
assert_redirected_to '/images/thumbnails/4pane.png'
assert File.exist?(PKG_4PANE_THUMBNAIL)
end
ensure
FileUtils.rm_f PKG_4PANE_THUMBNAIL
end

def test_thumbnail_failed_download_uses_default_image
VCR.use_cassette('default') do
stub_request(:any, 'http://www.4Pane.co.uk/4Pane624x351.png')
Expand Down
10 changes: 5 additions & 5 deletions test/models/appdata_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@ class AppdataTest < ActiveSupport::TestCase
appdata = Appdata.get('factory')
pkg_list = appdata[:apps].map { |p| p[:pkgname] }.uniq

assert_equal 739, pkg_list.size
%w[0ad 4pane opera steam].each do |pkg|
assert_equal 736, pkg_list.size
%w[4pane opera steam].each do |pkg|
assert_includes pkg_list, pkg
end
end
end

test 'Leap 15.1 Appdata can be parsed' do
test 'Leap 15.2 Appdata can be parsed' do
VCR.use_cassette('default') do
appdata = Appdata.get('leap/15.1')
appdata = Appdata.get('leap/15.2')
pkg_list = appdata[:apps].map { |p| p[:pkgname] }.uniq

assert_equal 631, pkg_list.size
assert_equal 733, pkg_list.size
%w[0ad 4pane steam].each do |pkg|
assert_includes pkg_list, pkg
end
Expand Down
2 changes: 1 addition & 1 deletion test/obs_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class OBSTest < ActiveSupport::TestCase
'project' => 'home:dmacvicar',
'repository' => 'openSUSE_Tumbleweed',
'arch' => 'x86_64',
'filename' => 'vcpkg-0.0+git.1524688133.90be0d9b-9.22.x86_64.rpm'
'filename' => 'vcpkg-0.0+git.1524688133.90be0d9b-9.40.x86_64.rpm'
)
fileinfo = OBS.search_published_binary_fileinfo(binary)

Expand Down
Loading

0 comments on commit 6ee7da4

Please sign in to comment.