You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Problem
When using redmica_s3 plugin with dummy test configuration,
--- a/config/s3.yml+++ b/config/s3.yml++# Uncomment this to run plugin tests with standard redmine script+test:+ access_key_id: S3_ACCESS_KEY_ID+ secret_access_key: S3_SECRET_ACCESS_KEY+ bucket: S3_BUCKET_NAME
I encountered the following error.
% RAILS_ENV=test NAME=redmine_supply bundle exec rake redmine:plugins:test
Unknown database adapter `postgis` found in config/database.yml, use Gemfile.local to load your own database gems
Run options: --seed 14332
# Running:
.................E
Error:
SupplyItemTest#test_deletion_of_project_should_delete_supply_items:
Aws::S3::Errors::PermanentRedirect: The bucket you are attempting to access must be addressed using the specified endpoint. Please send all future requests to this endpoint.
plugins/redmica_s3/lib/redmica_s3/connection.rb:79:in `delete'
plugins/redmica_s3/lib/redmica_s3/attachment_patch.rb:244:in `delete_from_disk!'
app/models/attachment.rb:172:in `delete_from_disk'
plugins/redmine_supply/test/unit/supply_item_test.rb:59:in `block (2 levels) in <class:SupplyItemTest>'
plugins/redmine_supply/test/unit/supply_item_test.rb:58:in `block in <class:SupplyItemTest>'
rails test plugins/redmine_supply/test/unit/supply_item_test.rb:56
:
To Reproduce
Execute the following command with using redmica_s3 plugin's dummy test configuration.
sanak
changed the title
SupplyItemTest#test_deletion_of_project_should_delete_supply_items failed randomly when using S3 plugin + dummy configuration
SupplyItemTest#test_deletion_of_project_should_delete_supply_items failed randomly when using S3 plugin with dummy test configuration
May 23, 2022
Well, easiest fix is just deleting original fixture's attachments at the setup of the test as follows, but probably it is not the best solution, because supply => s3 plugin dependency is not preferable.
--- a/test/unit/supply_item_test.rb+++ b/test/unit/supply_item_test.rb@@ -5,6 +5,7 @@ class SupplyItemTest < ActiveSupport::TestCase
setup do
@project = Project.find 'ecookbook'
+ Attachment.delete_all
end
test 'should find items' do
The complex thing is that Redmine fixtures doesn't include actual attachments files, so this may be rather s3 plugin side work...
Problem
When using redmica_s3 plugin with dummy test configuration,
I encountered the following error.
To Reproduce
Execute the following command with using redmica_s3 plugin's dummy test configuration.
% RAILS_ENV=test NAME=redmine_supply bundle exec rake redmine:plugins:test
Expectation
The test should pass always.
The text was updated successfully, but these errors were encountered: