summaryrefslogtreecommitdiff
path: root/spec/support
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-12-19 18:09:34 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2022-12-19 18:09:34 +0000
commitd4e22f4ade1ce4dfd54f4d1740f074b2be441705 (patch)
tree5f1f1bbe3c7673905804170bfd1becf665d4b0b5 /spec/support
parentc18599314d98c0aa4dfe7d56423469f0b641d066 (diff)
downloadgitlab-ce-d4e22f4ade1ce4dfd54f4d1740f074b2be441705.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/support')
-rw-r--r--spec/support/helpers/gitaly_setup.rb2
-rw-r--r--spec/support/import_export/common_util.rb4
2 files changed, 3 insertions, 3 deletions
diff --git a/spec/support/helpers/gitaly_setup.rb b/spec/support/helpers/gitaly_setup.rb
index 278dc79e1d0..20c104cd85c 100644
--- a/spec/support/helpers/gitaly_setup.rb
+++ b/spec/support/helpers/gitaly_setup.rb
@@ -205,7 +205,7 @@ module GitalySetup
# This code needs to work in an environment where we cannot use bundler,
# so we cannot easily use the toml-rb gem. This ad-hoc parser should be
# good enough.
- config_text = IO.read(toml)
+ config_text = File.read(toml)
config_text.lines.each do |line|
match_data = line.match(/^\s*(socket_path|listen_addr)\s*=\s*"([^"]*)"$/)
diff --git a/spec/support/import_export/common_util.rb b/spec/support/import_export/common_util.rb
index 9da151895a7..3d7a0d29e71 100644
--- a/spec/support/import_export/common_util.rb
+++ b/spec/support/import_export/common_util.rb
@@ -83,7 +83,7 @@ module ImportExport
path = File.join(dir_path, "#{exportable_path}.json")
return unless File.exist?(path)
- Gitlab::Json.parse(IO.read(path))
+ Gitlab::Json.parse(File.read(path))
end
def consume_relations(dir_path, exportable_path, key)
@@ -101,7 +101,7 @@ module ImportExport
end
def project_json(filename)
- Gitlab::Json.parse(IO.read(filename))
+ Gitlab::Json.parse(File.read(filename))
end
end
end