Commit 5ff75d20 authored by Andrejs Cunskis's avatar Andrejs Cunskis

Move project import test to ee

parent a7d51dce
# frozen_string_literal: true
module QA
module EE
module Resource
module Project
# Get project push rules
#
# @return [Hash]
def push_rules
response = get(request_url(api_push_rules_path))
parse_body(response)
end
# Add project push rules
#
# Rule list: https://docs.gitlab.com/ee/api/projects.html#add-project-push-rule
#
# @param [Hash] rules
# @return [void]
def add_push_rules(rules)
api_post_to(api_push_rules_path, rules)
end
def api_push_rules_path
"#{api_get_path}/push_rule"
end
end
end
end
end
......@@ -217,10 +217,6 @@ module QA
"#{api_get_path}/wikis"
end
def api_push_rules_path
"#{api_get_path}/push_rule"
end
def api_post_body
post_body = {
name: name,
......@@ -372,15 +368,6 @@ module QA
parse_body(response)
end
def push_rules
response = get(request_url(api_push_rules_path))
parse_body(response)
end
def add_push_rules(rules)
api_post_to(api_push_rules_path, rules)
end
# Object comparison
#
# @param [QA::Resource::Project] other
......@@ -441,3 +428,5 @@ module QA
end
end
end
QA::Resource::Project.prepend_mod_with('Resource::Project', namespace: QA)
......@@ -171,7 +171,10 @@ module QA
imported_group # trigger import
end
it 'successfully imports repository' do
it(
'successfully imports repository',
testcase: 'https://gitlab.com/gitlab-org/quality/testcases/-/quality/test_cases/2427'
) do
expect { imported_group.import_status }.to eventually_eq('finished').within(import_wait_duration)
expect(imported_projects.count).to eq(1), 'Expected to have 1 imported project'
......
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