Closed (fixed)
Project:
Drupal core
Version:
7.x-dev
Component:
other
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
30 Jun 2010 at 07:08 UTC
Updated:
3 Jan 2014 at 01:42 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
Anonymous (not verified) commentedwe're passing crap into node_load_multiple(), that's dump of $nids before this line in node_load():
Comment #2
Anonymous (not verified) commentedand that's because we don't validate FileFieldTestCase::uploadNodeFile() actually worked:
Comment #3
marcvangendis this a duplicate of #840182: Testing is broken?
Comment #4
Anonymous (not verified) commentedlooks like the code that calls FileFieldTestCase::updateFileField() was broken by the changes in this issue #693084: Regression: file_munge_filename() extension handling broken by move to File Field:
that no longer does what it says in the comment. don't have time to figure out the magic incantation we need to pass in here now, will circle back to it later unless someone beats me to it.
Comment #5
Stevel commentedCould some of the image test files be related to #562968: Optimize module and theme images?
Comment #6
Stevel commentedLets try if reversing the suspected patch makes the tests work. If so, we are at least certain where to look at.
Comment #7
Stevel commentedSet back to active as the above certainly is not for solving the issue.
Comment #8
rfayAll of the test bots have failed validation as a result of this one, so after the fix is committed, they'll have to be re-tested.
Comment #9
Anonymous (not verified) commentedThis is much, much simpler than it looks. this commit:
http://drupal.org/cvs?commit=385780
changed the file sizes, so we no longer get a GIF image from:
so the tests that blindly expect that fail. attached patch changes the tests to use actual extension of $test_file. now the broken tests pass.
Comment #10
Anonymous (not verified) commentedoh, seems there are more tests to fix, patch coming shortly.
Comment #11
Anonymous (not verified) commentednow with a little bit less broken, upload tests pass, still have to fix:
Image field display tests (ImageFieldDisplayTestCase) [Image] 98 8 3
Image field validation tests (ImageFieldValidateTestCase) [Image] 24 2 3
Image styles path and URL functions (ImageStylesPathAndUrlUnitTest) [Image] 44 2 0
Comment #12
Anonymous (not verified) commentedok, the broken tests now pass for me locally.
how do we get the bot turned back on?
Comment #13
plachI'm afraid we can't: I think the bot won't run until the head gets fixed. Someone has to test the patch locally and RTBC.
Comment #14
rfayIt has to get committed before we can turn on the bot, because all the bots think they've failed testing.
Comment #15
Stevel commentededit: double post, see below.
Comment #16
Stevel commentedWhat does this give when the gif file becomes smaller again? Would it be a problem when an extension is added twice?
Some trailing whitespace here.
Powered by Dreditor.
Comment #17
Anonymous (not verified) commentedupdates as per #16.
Comment #18
dries commentedDo we have to use a variable $test_file_extension? If we know it is a 'gif' file, can't we simply hardcode the extension?
Comment #19
Stevel commentedIt's always the smallest image file found. This was the gif file previously. When #562968: Optimize module and theme images got committed, the png version became smaller.
This patch prevents the tests from failing when an image gets updated (and another filetype becomes the smallest image).
Comment #20
Stevel commentedLooks OK
Comment #21
Anonymous (not verified) commented@Dries - the point of the indirection is to make the tests able to survive changes to the test files.
seems overly brittle to depend on exact file names, sizes and dimensions if we don't need to. we're testing stuff like 'can i add an extension to the list of extensions and upload a file with that extension' etc.
webchick suggested we could just put the hardcoding back, and i'm not totally opposed to that, but it seems better to me to avoid that unless we have to do it.
Comment #22
andypost+1 Confirm that this patch fixes all image and file related tests.
Suppose better proceed with current approach because hard-coded things like 'dimensions', 'size' and etc are lead to nonavailability of UI related patches (when images are changed) or broken HEAD
Comment #23
webchickI was originally in Dries's camp of making the test more obvious rather than adding more layers of indirection so it doesn't take the next poor slob who breaks this test an hour to figure out what's going on, but Justin gave a pretty good case for this making the test more robust going forward so hopefully random changes like file sizes and whatnot shouldn't break things horribly like they did in this case.
Committed to HEAD, so we can get the bot working again. Dries, if you feel strongly about this, as always feel free to revert.