diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-09-20 16:18:24 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-09-20 16:18:24 +0300 |
commit | 0653e08efd039a5905f3fa4f6e9cef9f5d2f799c (patch) | |
tree | 4dcc884cf6d81db44adae4aa99f8ec1233a41f55 /spec/tasks/gitlab/db_rake_spec.rb | |
parent | 744144d28e3e7fddc117924fef88de5d9674fe4c (diff) |
Add latest changes from gitlab-org/gitlab@14-3-stable-eev14.3.0-rc42
Diffstat (limited to 'spec/tasks/gitlab/db_rake_spec.rb')
-rw-r--r-- | spec/tasks/gitlab/db_rake_spec.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/spec/tasks/gitlab/db_rake_spec.rb b/spec/tasks/gitlab/db_rake_spec.rb index 8e98a42510e..91cd09fc6e6 100644 --- a/spec/tasks/gitlab/db_rake_spec.rb +++ b/spec/tasks/gitlab/db_rake_spec.rb @@ -129,13 +129,14 @@ RSpec.describe 'gitlab:db namespace rake task', :silence_stdout do let(:output) { StringIO.new } before do - structure_files = %w[db/structure.sql db/ci_structure.sql] + structure_files = %w[structure.sql ci_structure.sql] allow(File).to receive(:open).and_call_original - structure_files.each do |structure_file| + structure_files.each do |structure_file_name| + structure_file = File.join(ActiveRecord::Tasks::DatabaseTasks.db_dir, structure_file_name) stub_file_read(structure_file, content: input) - allow(File).to receive(:open).with(Rails.root.join(structure_file).to_s, any_args).and_yield(output) + allow(File).to receive(:open).with(structure_file.to_s, any_args).and_yield(output) end end |