The file manager spec cleans its directory before it fills it
One run out of a dozen failed on "creates a folder and returns to the directory": the spec created its artifact directory under `tmp/` and only removed it afterwards, so anything left behind by an interrupted run was still there when the next one started, and `mkdir` on an existing folder answers with the alert instead of the notice. It removes the directory first now. The suite is green across ten consecutive runs and every seed tried, including the one that failed. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -8,6 +8,7 @@ RSpec.describe "Admin file manager", type: :request do
|
||||
let(:container) { Rails.root.join("tmp/files-spec").to_s }
|
||||
|
||||
before do
|
||||
FileUtils.rm_rf(container)
|
||||
FileUtils.mkdir_p(File.join(container, "mygame-1.0"))
|
||||
File.write(File.join(container, "mygame-1.0.zip"), "zipdata")
|
||||
allow(WarpEngine.config).to receive(:file_container_path).and_return(container)
|
||||
|
||||
Reference in New Issue
Block a user