Commit 8ef02578 authored by Andrejs Cunskis's avatar Andrejs Cunskis

Merge branch 'acunskis-import-wiki' into 'master'

E2E: Validate project wiki migration

See merge request gitlab-org/gitlab!75473
parents f944e9a4 05ed0577
...@@ -368,6 +368,10 @@ module QA ...@@ -368,6 +368,10 @@ module QA
parse_body(response) parse_body(response)
end end
def create_wiki_page(title:, content:)
api_post_to(api_wikis_path, title: title, content: content)
end
# Object comparison # Object comparison
# #
# @param [QA::Resource::Project] other # @param [QA::Resource::Project] other
......
...@@ -182,6 +182,24 @@ module QA ...@@ -182,6 +182,24 @@ module QA
expect(imported_commits).to match_array(source_commits) expect(imported_commits).to match_array(source_commits)
expect(imported_tags).to match_array(source_tags) expect(imported_tags).to match_array(source_tags)
expect(imported_branches).to match_array(source_branches) expect(imported_branches).to match_array(source_branches)
expect(project_import_failures).to be_empty, "Expected no errors, was: #{project_import_failures}"
end
end
end
context 'with wiki' do
before do
source_project.create_wiki_page(title: 'Import test project wiki', content: 'Wiki content')
imported_group # trigger import
end
it 'successfully imports project wiki' do
expect { imported_group.import_status }.to eventually_eq('finished').within(import_wait_duration)
expect(imported_projects.count).to eq(1), 'Expected to have 1 imported project'
aggregate_failures do
expect(imported_projects.first.wikis).to eq(source_project.wikis)
expect(project_import_failures).to be_empty, "Expected no errors, was: #{project_import_failures}"
end end
end end
end end
......
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