Project

General

Profile

Actions

Patch #32122

closed

Fix test failure due to missing call to set_tmp_attachments_directory

Added by Yuichi HARADA about 5 years ago. Updated about 5 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Code cleanup/refactoring
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:

Description

https://www.redmine.org/builds/logs/build_trunk_postgresql_ruby-2.4_583.html

...F

Failure:
AttachmentsControllerTest#test_download_should_assign_content_type_if_blank [/var/lib/jenkins/workspace/trunk/DATABASE_ADAPTER/postgresql/RUBY_VER/ruby-2.4/test/functional/attachments_controller_test.rb:345]:
Expected response to be a <2XX: success>, but was a <404: Not Found>

bin/rails test test/functional/attachments_controller_test.rb:339

.........................................................................................................F

Failure:
Redmine::ApiTest::AttachmentsTest#test_GET_/attachments/thumbnail/:id_should_return_the_thumbnail [/var/lib/jenkins/workspace/trunk/DATABASE_ADAPTER/postgresql/RUBY_VER/ruby-2.4/test/integration/api_test/attachments_test.rb:83]:
Expected response to be a <2XX: success>, but was a <404: Not Found>

bin/rails test test/integration/api_test/attachments_test.rb:80

...F

Failure:
Redmine::ApiTest::AttachmentsTest#test_GET_/attachments/:id.xml_for_image_should_include_thumbnail_url [/var/lib/jenkins/workspace/trunk/DATABASE_ADAPTER/postgresql/RUBY_VER/ruby-2.4/test/integration/api_test/attachments_test.rb:54]:
Expected response to be a <2XX: success>, but was a <404: Not Found>
Response body: 

bin/rails test test/integration/api_test/attachments_test.rb:52

....................................................................................................................................................................................................................................................................F

Failure:
ApplicationHelperTest#test_attached_images_should_read_later [/var/lib/jenkins/workspace/trunk/DATABASE_ADAPTER/postgresql/RUBY_VER/ruby-2.4/test/helpers/application_helper_test.rb:249]:
Expected false to be truthy.

bin/rails test test/helpers/application_helper_test.rb:245

.........................................................................................................F

Failure:
AttachmentsTest#test_download_should_set_sendfile_header [/var/lib/jenkins/workspace/trunk/DATABASE_ADAPTER/postgresql/RUBY_VER/ruby-2.4/test/integration/attachments_test.rb:153]:
Expected response to be a <2XX: success>, but was a <404: Not Found>

bin/rails test test/integration/attachments_test.rb:148

I think the reason why the test failed is that Attachments under test/fixtures/files/ is missing.
I think I should call to set_tmp_attachments_directory . I attached a patch.


Files

Actions

Also available in: Atom PDF