Skip to content

Move source test results location#1341

Open
fbacall wants to merge 1 commit into
masterfrom
test-results-dri
Open

Move source test results location#1341
fbacall wants to merge 1 commit into
masterfrom
test-results-dri

Conversation

@fbacall

@fbacall fbacall commented Jul 23, 2026

Copy link
Copy Markdown
Member

Summary of changes

  • Moves them into a directory under tmp instead of in there directly.

Motivation and context

In a deployment where 2 app instances are sharing DB/storage, one instance could not access test results run on the other. After this change it is possible via symlinks.

Checklist

  • I have read and followed the CONTRIBUTING guide.
  • I confirm that I have the authority necessary to make this contribution on behalf of its copyright owner and agree to license it to the TeSS codebase under the BSD license.

So they can be symlinked if necessary

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Moves persisted “source test results” YAML files into a dedicated subdirectory under tmp/ to make the storage location easier to share (e.g., via symlinks) across multiple app instances in a shared deployment.

Changes:

  • Change HasTestJob#test_results_path to write/read results under tmp/source_test_results/ instead of directly under tmp/.
  • Add on-demand creation of the tmp/source_test_results directory when computing the results path.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

def test_results_path
path_id = Rails.env.test? ? "fakeid_#{model_name.singular}_#{id}" : test_job_id
File.join(Rails.root, 'tmp', "test_results_#{path_id}.yml")
Rails.root.join('tmp', 'source_test_results').tap { |d| d.mkdir unless d.exist? }.join("test_results_#{path_id}.yml")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants