#41216 closed defect (bug) (fixed)
Avoid using 'http://localhost/foo-cropped.png' in tests
| Reported by: | danielbachhuber | Owned by: | SergeyBiryukov |
|---|---|---|---|
| Priority: | normal | Milestone: | 4.9 |
| Component: | Media | Version: | |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: |
Description
Two image header tests use a http://localhost/foo-cropped.png value:
Tests_Image_Header::test_create_attachment_objectTests_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.
9 years ago
#3
@
9 years ago
- Keywords has-patch added; needs-patch removed
Passing build with patch: https://travis-ci.org/desrosj/wordpress-develop/builds/248936584
Note:
See TracTickets
for help on using tickets.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
41216.1.diff updates the tests to use
foo-cropped.pnginstead ofhttp://localhost/foo-cropped.php, and corrects the order of arguments passed to assertions.