Skip to content

Commit 034398f

Browse files
committed
Address ActiveStorage::VariantTest#test_resized_variation_of_WEBP_blob failure at Rails Nightly CI
Managed to reproduce Rails Nightly CI failure at https://buildkite.com/rails/rails-nightly/builds/149#018d9052-1b2d-48fa-9d74-a39df3f3f1d6/1251-1291 This commit allows both 33 and 34 as its height because this issue is isolated that thedifference comes from libvips and/or ruby-vips behavior differences, not Active Storage. * Steps to reprodude Run this test on Ubuntu 22.04. It should not reproduce on Ubuntu 23.10. ``` git clone https://github.com/rails/rails cd rails rm Gemfile.lock cd activestorage bin/test test/models/variant_test.rb -n test_resized_variation_of_WEBP_blob ``` * Expected behavior It should pass. * Actual behavior It fails because the height of the thumbnail is 34. ``` $ bin/test test/models/variant_test.rb -n test_resized_variation_of_WEBP_blob F Failure: ActiveStorage::VariantTest#test_resized_variation_of_WEBP_blob [test/models/variant_test.rb:125]: Expected: 33 Actual: 34 bin/test test/models/variant_test.rb:117 ``` Refer to libvips/ruby-vips#383
1 parent a42ca9c commit 034398f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

activestorage/test/models/variant_test.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ class ActiveStorage::VariantTest < ActiveSupport::TestCase
122122
image = read_image(variant)
123123
assert_equal "WEBP", image.type
124124
assert_equal 50, image.width
125-
assert_equal 33, image.height
125+
assert_includes [33, 34], image.height
126126
end
127127

128128
test "optimized variation of GIF blob" do

0 commit comments

Comments
 (0)