#41216 closed defect (bug) (fixed)
Avoid using 'http://localhost/foo-cropped.png' in tests
Reported by: | danielbachhuber | Owned by: | SergeyBiryukov |
---|---|---|---|
Milestone: | 4.9 | Priority: | normal |
Severity: | normal | Version: | |
Component: | Media | Keywords: | has-patch |
Focuses: | Cc: |
Description
Two image header tests use a http://localhost/foo-cropped.png
value:
Tests_Image_Header::test_create_attachment_object
Tests_Image_Header::test_insert_cropped_attachment
In some system configurations, this can cause ImageMagick to throw an exception:
ImagickException: getimagesize(http://localhost/foo-cropped.png): failed to open stream: Connection refused
This was originally added in r27847. In skimming through #21785, it doesn't appear to be a deliberate decision to use http://localhost/foo-cropped.png
. It would be better to use a value that doesn't trigger an outbound HTTP request.
Attachments (1)
Change History (9)
This ticket was mentioned in Slack in #hosting-community by danielbachhuber. View the logs.
7 years ago
#3
@
7 years ago
- Keywords has-patch added; needs-patch removed
Passing build with patch: https://travis-ci.org/desrosj/wordpress-develop/builds/248936584
#6
@
7 years ago
I think the GUID should remain a URL, otherwise it gets sanitized to an invalid URL: http://foo-cropped.png
.
Note: See
TracTickets for help on using
tickets.
41216.1.diff updates the tests to use
foo-cropped.png
instead ofhttp://localhost/foo-cropped.php
, and corrects the order of arguments passed to assertions.