Commit fd81907f authored by Mark Lapierre's avatar Mark Lapierre

Use same test group path and name

Set the path or name of a group, but not both, use the same value
for both. This avoids problems where we specify the name but
search for the path. They used to have the same value (path) and
the name wasn't actually passed to GitLab.
parent 3320965b
...@@ -10,7 +10,11 @@ module QA ...@@ -10,7 +10,11 @@ module QA
end end
attribute :name do attribute :name do
@name || path @name || @path || Runtime::Namespace.name
end
attribute :path do
@path || @name || Runtime::Namespace.name
end end
attribute :sandbox do attribute :sandbox do
...@@ -20,7 +24,6 @@ module QA ...@@ -20,7 +24,6 @@ module QA
end end
def initialize def initialize
@path = Runtime::Namespace.name
@description = "QA test run at #{Runtime::Namespace.time}" @description = "QA test run at #{Runtime::Namespace.time}"
@require_two_factor_authentication = false @require_two_factor_authentication = false
end end
...@@ -64,7 +67,7 @@ module QA ...@@ -64,7 +67,7 @@ module QA
{ {
parent_id: sandbox.id, parent_id: sandbox.id,
path: path, path: path,
name: name || path, name: name,
visibility: 'public', visibility: 'public',
require_two_factor_authentication: @require_two_factor_authentication, require_two_factor_authentication: @require_two_factor_authentication,
avatar: avatar avatar: avatar
......
...@@ -10,13 +10,13 @@ module QA ...@@ -10,13 +10,13 @@ module QA
let(:group) do let(:group) do
Resource::Group.fabricate_via_api! do |group| Resource::Group.fabricate_via_api! do |group|
group.name = 'group-to-test-milestones' group.name = "group-to-test-milestones-#{SecureRandom.hex(4)}"
end end
end end
let(:project) do let(:project) do
Resource::Project.fabricate_via_api! do |project| Resource::Project.fabricate_via_api! do |project|
project.name = 'project-to-test-milestones' project.name = "project-to-test-milestones-#{SecureRandom.hex(4)}"
project.group = group project.group = group
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