summaryrefslogtreecommitdiff
path: root/qa/qa/resource/sandbox.rb
diff options
context:
space:
mode:
Diffstat (limited to 'qa/qa/resource/sandbox.rb')
-rw-r--r--qa/qa/resource/sandbox.rb14
1 files changed, 13 insertions, 1 deletions
diff --git a/qa/qa/resource/sandbox.rb b/qa/qa/resource/sandbox.rb
index b351d92092f..ae183d55d89 100644
--- a/qa/qa/resource/sandbox.rb
+++ b/qa/qa/resource/sandbox.rb
@@ -31,7 +31,6 @@ module QA
Page::Group::New.perform do |group|
group.set_path(path)
- group.set_description('GitLab QA Sandbox Group')
group.set_visibility('Public')
group.create
end
@@ -76,6 +75,19 @@ module QA
visibility: 'public'
}
end
+
+ def api_put_path
+ "/groups/#{id}"
+ end
+
+ def update_group_setting(group_setting:, value:)
+ put_body = { "#{group_setting}": value }
+ response = put Runtime::API::Request.new(api_client, api_put_path).url, put_body
+
+ unless response.code == HTTP_STATUS_OK
+ raise ResourceUpdateFailedError, "Could not update #{group_setting} to #{value}. Request returned (#{response.code}): `#{response}`."
+ end
+ end
end
end
end