summaryrefslogtreecommitdiff
path: root/qa/qa/resource/bulk_import_group.rb
diff options
context:
space:
mode:
Diffstat (limited to 'qa/qa/resource/bulk_import_group.rb')
-rw-r--r--qa/qa/resource/bulk_import_group.rb19
1 files changed, 11 insertions, 8 deletions
diff --git a/qa/qa/resource/bulk_import_group.rb b/qa/qa/resource/bulk_import_group.rb
index e8dc2d291b8..a22529152e1 100644
--- a/qa/qa/resource/bulk_import_group.rb
+++ b/qa/qa/resource/bulk_import_group.rb
@@ -3,18 +3,21 @@
module QA
module Resource
class BulkImportGroup < Group
- attributes :source_group_path,
+ attributes :source_group,
+ :destination_group,
:import_id
- attribute :destination_group_path do
- source_group_path
- end
-
attribute :access_token do
api_client.personal_access_token
end
- alias_method :path, :source_group_path
+ # In most cases we will want to set path the same as source group
+ # but it can be set to a custom name as well when imported via API
+ attribute :destination_group_path do
+ source_group.path
+ end
+ # Can't define path as attribue since @path is set in base class initializer
+ alias_method :path, :destination_group_path
delegate :gitlab_address, to: 'QA::Runtime::Scenario'
@@ -51,9 +54,9 @@ module QA
entities: [
{
source_type: 'group_entity',
- source_full_path: source_group_path,
+ source_full_path: source_group.full_path,
destination_name: destination_group_path,
- destination_namespace: sandbox.path
+ destination_namespace: sandbox.full_path
}
]
}