Fix railties tests for Propshaft and maintain support for Sprockets#52899
Merged
dhh merged 1 commit intopropshaft-only-for-new-appsfrom Sep 14, 2024
Merged
Fix railties tests for Propshaft and maintain support for Sprockets#52899dhh merged 1 commit intopropshaft-only-for-new-appsfrom
dhh merged 1 commit intopropshaft-only-for-new-appsfrom
Conversation
Member
|
I think we still need to retain these sprocket specific tests. But we should move them into their own suite, so at some point, in the far future, they can be moved into a rails-sprockets gem. |
Create `sprockets_assets_test.rb` file that will contain the sprockets-specific tests of `assets_test.rb` (which in turn will contain the tests common to both pipelines). There is one flaky test, but I have seen this flake on main before. ``` $ bin/test test/application/sprockets_assets_test.rb ........................E, [2024-09-14T08:35:08.072799 #1983325] ERROR -- : [1ae49fc5-8c5a-48e4-ab4b-0ce5e73f79d0] [1ae49fc5-8c5a-48e4-ab4b-0ce5e73f79d0] ActionController::RoutingError (No route matches [GET] "/assets/demo.js"): [1ae49fc5-8c5a-48e4-ab4b-0ce5e73f79d0] ..** Invoke assets:precompile (first_time) ** Invoke assets:environment (first_time) ** Execute assets:environment ** Invoke environment (first_time) ** Execute environment ** Execute assets:precompile F Failure: ApplicationTests::SprocketsAssetsTest#test_precompile_shouldn't_use_the_digests_present_in_manifest.json [test/application/sprockets_assets_test.rb:326]: Expected "application-0a89120b13dcff9cb069311101add34ef7717de154816b01622972a4509eb5c9.css" to not be equal to "application-0a89120b13dcff9cb069311101add34ef7717de154816b01622972a4509eb5c9.css". bin/test test/application/sprockets_assets_test.rb:307 .. Finished in 1.424157s, 20.3629 runs/s, 120.0710 assertions/s. 29 runs, 171 assertions, 1 failures, 0 errors, 0 skips $ bin/test test/application/sprockets_assets_test.rb ........................E, [2024-09-14T08:35:12.994864 #1985849] ERROR -- : [615c9d49-d1bf-40c8-96a6-bf9c76a9a28d] [615c9d49-d1bf-40c8-96a6-bf9c76a9a28d] ActionController::RoutingError (No route matches [GET] "/assets/demo.js"): [615c9d49-d1bf-40c8-96a6-bf9c76a9a28d] ..** Invoke assets:precompile (first_time) ** Invoke assets:environment (first_time) ** Execute assets:environment ** Invoke environment (first_time) ** Execute environment ** Execute assets:precompile I, [2024-09-14T08:35:13.044219 #1986490] INFO -- : Writing /home/zzak/code/rails/tmp/d20240914-1985782-wcigrx/app/public/assets/rails-6738e33efa7b8d2036e0a0118601555f0b771ac042f6790f7538dd881a1a7f3a.png I, [2024-09-14T08:35:13.045199 #1986490] INFO -- : Writing /home/zzak/code/rails/tmp/d20240914-1985782-wcigrx/app/public/assets/application-f1fa81296280307c358b4bd65e4bfd705be90dc5eba7c04dcd1d76ec084c78e7.css I, [2024-09-14T08:35:13.045508 #1986490] INFO -- : Writing /home/zzak/code/rails/tmp/d20240914-1985782-wcigrx/app/public/assets/application-f1fa81296280307c358b4bd65e4bfd705be90dc5eba7c04dcd1d76ec084c78e7.css.gz I, [2024-09-14T08:35:13.045767 #1986490] INFO -- : Writing /home/zzak/code/rails/tmp/d20240914-1985782-wcigrx/app/public/assets/rails-6738e33efa7b8d2036e0a0118601555f0b771ac042f6790f7538dd881a1a7f3a.png ... ``` Co-authored-by: Tute Costa <tutecosta@gmail.com> Co-authored-by: Federico Sapuppo <fedesapuppo@hotmail.com>
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Combine #52122 and fix the remaining failures for #52887.
I've squashed those commits once I felt confident there was no missing cases, but it might be a useful exercise to review the commits from the other PR as well for those interested.
There is one flaky test, but I have seen this flake on main before.
(Edit: yup, it was reported in #50364)
Thanks @tute and @fedesapuppo for the initial push here!