Commit 0b4643a7 authored by Sanad Liaquat's avatar Sanad Liaquat

Merge branch 'egb-fix-issue-212912' into 'master'

Turn off autodevops for forked project source

Closes #212912

See merge request gitlab-org/gitlab!29816
parents 3ade64ee 0b919a98
......@@ -54,11 +54,23 @@ module QA
end
end
private
include Support::Api
attr_writer :api_resource, :api_response
def api_put(body = api_put_body)
response = put(
Runtime::API::Request.new(api_client, api_put_path).url,
body)
unless response.code == HTTP_STATUS_OK
raise ResourceFabricationFailedError, "Updating #{self.class.name} using the API failed (#{response.code}) with `#{response}`."
end
process_api_response(parse_body(response))
end
private
def resource_web_url(resource)
resource.fetch(:web_url) do
raise ResourceURLMissingError, "API resource for #{self.class.name} does not expose a `web_url` property: `#{resource}`."
......@@ -92,18 +104,6 @@ module QA
process_api_response(parse_body(response))
end
def api_put
response = put(
Runtime::API::Request.new(api_client, api_put_path).url,
api_put_body)
unless response.code == HTTP_STATUS_OK
raise ResourceFabricationFailedError, "Updating #{self.class.name} using the API failed (#{response.code}) with `#{response}`."
end
process_api_response(parse_body(response))
end
def api_delete
url = Runtime::API::Request.new(api_client, api_delete_path).url
response = delete(url)
......
......@@ -10,6 +10,8 @@ module QA
merge_request.fork_branch = 'feature-branch'
end
merge_request.project.api_put(auto_devops_enabled: false)
Page::Main::Menu.perform(&:sign_out)
Page::Main::Login.perform(&:sign_in_using_credentials)
......
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