Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#32971 closed defect (bug) (fixed)

Tests for image thumbnail processing should not rely on a static filename

Reported by: jeremyfelt's profile jeremyfelt Owned by:
Milestone: 4.3 Priority: normal
Severity: normal Version: 4.3
Component: Media Keywords: has-patch
Focuses: multisite Cc:

Description

As of [33181], builds in Travis are failing during multisite tests due to a mismatch in filename between test-image.jpg and test-image1.jpg. It appears this may be the case because of how fast Travis runs the tests as I am unable to reproduce locally.

In test_insert_image_no_thumb(), we're currently checking that the returned filename is test-image.jpg, when it could be changed by wp_upload_bits() if a conflict exists. The new site icon tests also make use of test-image.jpg, which is likely where wires started crossing.

Attachments (1)

32971.diff (883 bytes) - added by jeremyfelt 10 years ago.

Download all attachments as: .zip

Change History (3)

@jeremyfelt
10 years ago

#1 @jeremyfelt
10 years ago

In 33188:

Tests: Check downsized images against dynamic rather than static filename when original is expected.

See #32971.

#2 @jeremyfelt
10 years ago

  • Resolution set to fixed
  • Status changed from new to closed

Everything is passing after [33188].

In the future we may want to explore using rand_str() or something for all filenames created in the upload directory.

Note: See TracTickets for help on using tickets.