Commit 8b2f1d2d authored by Kamil Trzciński's avatar Kamil Trzciński

Merge branch 'add-gitlab-version-to-group-export' into 'master'

Export GitLab Version on Group Export

See merge request gitlab-org/gitlab!31878
parents a6179b9f bb57e544
...@@ -52,7 +52,7 @@ module Groups ...@@ -52,7 +52,7 @@ module Groups
end end
def savers def savers
[tree_exporter, file_saver] [version_saver, tree_exporter, file_saver]
end end
def tree_exporter def tree_exporter
...@@ -72,6 +72,10 @@ module Groups ...@@ -72,6 +72,10 @@ module Groups
end end
end end
def version_saver
Gitlab::ImportExport::VersionSaver.new(shared: shared)
end
def file_saver def file_saver
Gitlab::ImportExport::Saver.new(exportable: @group, shared: @shared) Gitlab::ImportExport::Saver.new(exportable: @group, shared: @shared)
end end
......
...@@ -49,6 +49,12 @@ describe Groups::ImportExport::ExportService do ...@@ -49,6 +49,12 @@ describe Groups::ImportExport::ExportService do
FileUtils.rm_rf(archive_path) FileUtils.rm_rf(archive_path)
end end
it 'saves the version' do
expect(Gitlab::ImportExport::VersionSaver).to receive(:new).and_call_original
service.execute
end
it 'saves the models using ndjson tree saver' do it 'saves the models using ndjson tree saver' do
stub_feature_flags(group_export_ndjson: true) stub_feature_flags(group_export_ndjson: true)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment