diff options
Diffstat (limited to 'qa/qa/runtime/fixtures.rb')
-rw-r--r-- | qa/qa/runtime/fixtures.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/qa/qa/runtime/fixtures.rb b/qa/qa/runtime/fixtures.rb new file mode 100644 index 00000000000..72004d5b00a --- /dev/null +++ b/qa/qa/runtime/fixtures.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +module QA + module Runtime + module Fixtures + def fetch_template_from_api(api_path, key) + request = Runtime::API::Request.new(api_client, "/templates/#{api_path}/#{key}") + get request.url + json_body[:content] + end + + private + + def api_client + @api_client ||= Runtime::API::Client.new(:gitlab) + end + end + end +end |