diff options
author | Sanad Liaquat <sliaquat@gitlab.com> | 2019-01-23 15:42:20 +0500 |
---|---|---|
committer | Sanad Liaquat <sliaquat@gitlab.com> | 2019-01-24 09:32:56 +0500 |
commit | 150716d6c1f0d8b031e9cb4f5643601025c04937 (patch) | |
tree | 83fcd851b782836d4e3792fab696efeae857d37e /qa/qa/support | |
parent | 5cc49c16b8446d66a5176e208e9ca834aab746ba (diff) | |
download | gitlab-ce-150716d6c1f0d8b031e9cb4f5643601025c04937.tar.gz |
Add script to delete all subgroups within the specified group
Diffstat (limited to 'qa/qa/support')
-rw-r--r-- | qa/qa/support/api.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/qa/qa/support/api.rb b/qa/qa/support/api.rb index 1107d43161e..8aa7d6812ac 100644 --- a/qa/qa/support/api.rb +++ b/qa/qa/support/api.rb @@ -20,6 +20,24 @@ module QA e.response end + def delete(url) + RestClient::Request.execute( + method: :delete, + url: url, + verify_ssl: false) + rescue RestClient::ExceptionWithResponse => e + e.response + end + + def head(url) + RestClient::Request.execute( + method: :head, + url: url, + verify_ssl: false) + rescue RestClient::ExceptionWithResponse => e + e.response + end + def parse_body(response) JSON.parse(response.body, symbolize_names: true) end |