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
end
attribute :name do
@name || path
@name || @path || Runtime::Namespace.name
end
attribute :path do
@path || @name || Runtime::Namespace.name
end
attribute :sandbox do
......@@ -20,7 +24,6 @@ module QA
end
def initialize
@path = Runtime::Namespace.name
@description = "QA test run at #{Runtime::Namespace.time}"
@require_two_factor_authentication = false
end
......@@ -64,7 +67,7 @@ module QA
{
parent_id: sandbox.id,
path: path,
name: name || path,
name: name,
visibility: 'public',
require_two_factor_authentication: @require_two_factor_authentication,
avatar: avatar
......
......@@ -10,13 +10,13 @@ module QA
let(:group) do
Resource::Group.fabricate_via_api! do |group|
group.name = 'group-to-test-milestones'
group.name = "group-to-test-milestones-#{SecureRandom.hex(4)}"
end
end
let(:project) do
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
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