diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-05-15 12:07:59 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-05-15 12:07:59 +0300 |
commit | e5731d5194e20deb33725943248c5899e4fdf05d (patch) | |
tree | aac082e7b302151dfe38a8a58c0c90f1a66fa017 /spec/support/import_export | |
parent | 1e9d859394883d104191c51fa18c2353f7bcc1fd (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/support/import_export')
-rw-r--r-- | spec/support/import_export/common_util.rb | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/spec/support/import_export/common_util.rb b/spec/support/import_export/common_util.rb index 1a5668946c6..0069ae81b76 100644 --- a/spec/support/import_export/common_util.rb +++ b/spec/support/import_export/common_util.rb @@ -15,28 +15,9 @@ module ImportExport export_path = [prefix, 'spec', 'fixtures', 'lib', 'gitlab', 'import_export', name].compact export_path = File.join(*export_path) - if File.exist?(File.join(export_path, 'tree.tar.gz')) - extract_archive(export_path, 'tree.tar.gz') - end - allow_any_instance_of(Gitlab::ImportExport).to receive(:export_path) { export_path } end - def extract_archive(path, archive) - output, exit_status = Gitlab::Popen.popen(["cd #{path}; tar xzf #{archive}"]) - - raise "Failed to extract archive. Output: #{output}" unless exit_status.zero? - end - - def cleanup_artifacts_from_extract_archive(name, prefix = nil) - export_path = [prefix, 'spec', 'fixtures', 'lib', 'gitlab', 'import_export', name].compact - export_path = File.join(*export_path) - - if File.exist?(File.join(export_path, 'tree.tar.gz')) - system("cd #{export_path}; rm -fr tree") - end - end - def setup_reader(reader) if reader == :ndjson_reader && Feature.enabled?(:project_import_ndjson) allow_any_instance_of(Gitlab::ImportExport::JSON::LegacyReader::File).to receive(:exist?).and_return(false) |