Commit 4ad9cf1f authored by Tomislav Nikic's avatar Tomislav Nikic

Adding a workaround for fork

Since on production or canary the api available,
it has to be created via the browser.
For this the API Client method never signs into the other user.
parent 886d9e04
...@@ -61,6 +61,9 @@ module QA ...@@ -61,6 +61,9 @@ module QA
def fabricate_via_api! def fabricate_via_api!
populate(:upstream, :user) populate(:upstream, :user)
# Remove after Issue:
Flow::Login.sign_in(as: user) if Specs::Helpers::ContextSelector.dot_com?
@api_client = Runtime::API::Client.new(:gitlab, is_new_session: false, user: user) @api_client = Runtime::API::Client.new(:gitlab, is_new_session: false, user: user)
Runtime::Logger.debug("Forking project #{upstream.name} to namespace #{user.username}...") Runtime::Logger.debug("Forking project #{upstream.name} to namespace #{user.username}...")
...@@ -68,6 +71,9 @@ module QA ...@@ -68,6 +71,9 @@ module QA
wait_until_forked wait_until_forked
populate(:project) populate(:project)
# Remove after Issue:
Flow::Login.sign_in if Specs::Helpers::ContextSelector.dot_com?
end end
def remove_via_api! def remove_via_api!
......
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