Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
5ff75d20
Commit
5ff75d20
authored
Nov 28, 2021
by
Andrejs Cunskis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move project import test to ee
parent
a7d51dce
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
14 deletions
+37
-14
qa/qa/ee/resource/project.rb
qa/qa/ee/resource/project.rb
+31
-0
qa/qa/resource/project.rb
qa/qa/resource/project.rb
+2
-13
qa/qa/specs/features/ee/api/1_manage/bulk_import_project_spec.rb
...pecs/features/ee/api/1_manage/bulk_import_project_spec.rb
+4
-1
No files found.
qa/qa/ee/resource/project.rb
0 → 100644
View file @
5ff75d20
# 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
qa/qa/resource/project.rb
View file @
5ff75d20
...
...
@@ -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
)
qa/qa/specs/features/api/1_manage/bulk_import_project_spec.rb
→
qa/qa/specs/features/
ee/
api/1_manage/bulk_import_project_spec.rb
View file @
5ff75d20
...
...
@@ -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'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment