DEV: Re-enable minio specs by pre-installing minio binary before test run (#24050)

This fixes a similar issue to 8b3eca0 where an Errno::ETXTBSY error was raised because the minio_runner gem was trying to install the binary across multiple processes in rspec. If we just make sure the latest version is installed before the tests run, this shouldn't happen, since MinioRunner.start will not do any further attempts at installation if the latest version is installed.
This commit is contained in:
Martin Brennan
2023-10-24 12:43:14 +10:00
committed by GitHub
parent 9e4a72945c
commit d5e8bd790b
5 changed files with 13 additions and 5 deletions

View File

@@ -110,7 +110,13 @@ describe "Uploading files in the composer to S3", type: :system do
# Extra wait time is added because the job can slow down the processing of the request.
img = first_post_img(wait: 10)
expect(img["src"]).not_to include("/secure-uploads")
# At first the image will be secure when created via the composer, usually the
# CookedPostProcessor job fixes this but running it immediately when creating the
# post doesn't work in the test, so we need to rebake here to get the correct result.
expect(page).to have_css("img[src*='secure-uploads']")
Post.last.rebake!
expect(page).not_to have_css("img[src*='secure-uploads']", wait: 5)
topic = topic_page.current_topic
expect(topic.first_post.uploads.first.secure).to eq(false)
end

View File

@@ -22,7 +22,7 @@ describe "Uploading files in the composer to S3", type: :system do
attach_file(File.absolute_path(file_from_fixtures("logo.jpg"))) do
find("#avatar-uploader").click
end
expect(page).to have_css(".avatar-uploader label[data-uploaded]")
expect(page).to have_css(".avatar-uploader .avatar-uploader__button[data-uploaded]")
modal.click_primary_button
expect(modal).to be_closed
expect(page).to have_css(