Skip to content

Commit

Permalink
dont use tmpfiles here (#4092)
Browse files Browse the repository at this point in the history
Dont use tmpfiles here, instead touching files with appropriate extensions.
  • Loading branch information
johrstrom authored Jan 30, 2025
1 parent 2325bd7 commit 1c80ef7
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions apps/dashboard/test/system/batch_connect_widgets_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -80,8 +80,9 @@ def make_bc_app(dir, form)
stub_sacctmgr
stub_git("#{dir}/app")

Tempfile.new("test.py", "#{Rails.root}/tmp")
Tempfile.new("test.rb", "#{Rails.root}/tmp")
['test.py', 'test.rbpy'].each do |file|
FileUtils.touch("#{Rails.root}/tmp/#{file}")
end

form = <<~HEREDOC
---
Expand All @@ -94,7 +95,7 @@ def make_bc_app(dir, form)
widget: 'path_selector'
directory: "#{Rails.root}/tmp"
show_files: true
file_pattern: \.py
file_pattern: \\.py
HEREDOC

Pathname.new("#{dir}/app/").join('form.yml').write(form)
Expand Down

0 comments on commit 1c80ef7

Please sign in to comment.