Commit bc5a8494 authored by Heinrich Lee Yu's avatar Heinrich Lee Yu

Merge branch 'mk/attempt-fix-group-tree-saver-epic-selection' into 'master'

Attempt to fix Transient failure in ee/spec/lib/ee/gitlab/import_export/group_tree_saver_spec.rb:44

See merge request gitlab-org/gitlab!23128
parents 6921db1b e7dae6cf
...@@ -33,6 +33,12 @@ describe Gitlab::ImportExport::GroupTreeSaver do ...@@ -33,6 +33,12 @@ describe Gitlab::ImportExport::GroupTreeSaver do
end end
context 'epics relation' do context 'epics relation' do
let(:epic_json) do
saved_group_json['epics'].find do |attrs|
attrs['id'] == epic.id
end
end
it 'saves top level epics' do it 'saves top level epics' do
expect_successful_save(group_tree_saver) expect_successful_save(group_tree_saver)
expect(saved_group_json['epics'].size).to eq(2) expect(saved_group_json['epics'].size).to eq(2)
...@@ -41,7 +47,7 @@ describe Gitlab::ImportExport::GroupTreeSaver do ...@@ -41,7 +47,7 @@ describe Gitlab::ImportExport::GroupTreeSaver do
it 'saves parent of epic' do it 'saves parent of epic' do
expect_successful_save(group_tree_saver) expect_successful_save(group_tree_saver)
parent = saved_group_json['epics'].first['parent'] parent = epic_json['parent']
expect(parent).not_to be_empty expect(parent).not_to be_empty
expect(parent['id']).to eq(parent_epic.id) expect(parent['id']).to eq(parent_epic.id)
...@@ -50,7 +56,7 @@ describe Gitlab::ImportExport::GroupTreeSaver do ...@@ -50,7 +56,7 @@ describe Gitlab::ImportExport::GroupTreeSaver do
it 'saves epic notes' do it 'saves epic notes' do
expect_successful_save(group_tree_saver) expect_successful_save(group_tree_saver)
notes = saved_group_json['epics'].first['notes'] notes = epic_json['notes']
expect(notes).not_to be_empty expect(notes).not_to be_empty
expect(notes.first['note']).to eq(note.note) expect(notes.first['note']).to eq(note.note)
......
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