summaryrefslogtreecommitdiff
path: root/qa/qa/support
diff options
context:
space:
mode:
authorGrant Young <gyoung@gitlab.com>2019-07-01 06:01:44 +0000
committerMark Lapierre <mlapierre@gitlab.com>2019-07-01 06:01:44 +0000
commiteecd85d4618d747a407634e9fbf682b797ad2198 (patch)
tree4cb52c1ab6615ac0cbe5b6b72dfe249589e515d8 /qa/qa/support
parent58f3a5615490aa30a5adda83ebb8ab66de891859 (diff)
downloadgitlab-ce-eecd85d4618d747a407634e9fbf682b797ad2198.tar.gz
First pass at new automated QA API test for #52703
Checks that archives of two different user projects with the same name aren't the same via checksum. I.E. a user can't download the archive of another's project by mistake. To enable the test some enhancements were made. Namely updating the client module to handle more than one API instance and the creation a custom rest call method that downloads to tmp.
Diffstat (limited to 'qa/qa/support')
-rw-r--r--qa/qa/support/api.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/qa/qa/support/api.rb b/qa/qa/support/api.rb
index a5c86425465..203064b2665 100644
--- a/qa/qa/support/api.rb
+++ b/qa/qa/support/api.rb
@@ -16,11 +16,12 @@ module QA
e.response
end
- def get(url)
+ def get(url, raw_response: false)
RestClient::Request.execute(
method: :get,
url: url,
- verify_ssl: false)
+ verify_ssl: false,
+ raw_response: raw_response)
rescue RestClient::ExceptionWithResponse => e
e.response
end