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
fc5756ea
Commit
fc5756ea
authored
Nov 11, 2021
by
Andrejs Cunskis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Create project with push rules for import spec
parent
57b6e1f6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
1 deletion
+15
-1
qa/qa/resource/project.rb
qa/qa/resource/project.rb
+13
-0
qa/qa/specs/features/api/1_manage/bulk_import_project_spec.rb
...a/specs/features/api/1_manage/bulk_import_project_spec.rb
+2
-1
No files found.
qa/qa/resource/project.rb
View file @
fc5756ea
...
...
@@ -217,6 +217,10 @@ 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
,
...
...
@@ -361,6 +365,15 @@ 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
...
...
qa/qa/specs/features/api/1_manage/bulk_import_project_spec.rb
View file @
fc5756ea
...
...
@@ -33,6 +33,7 @@ module QA
Resource
::
Project
.
fabricate_via_api!
do
|
project
|
project
.
api_client
=
api_client
project
.
group
=
source_group
project
.
initialize_with_readme
=
true
end
end
...
...
@@ -60,7 +61,7 @@ module QA
sandbox
.
add_member
(
user
,
Resource
::
Members
::
AccessLevel
::
MAINTAINER
)
source_project
# fabricate source group and project
source_project
.
tap
{
|
project
|
project
.
add_push_rules
(
member_check:
true
)
}
# fabricate source group and project
end
after
do
...
...
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