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
d2700a47
Commit
d2700a47
authored
Jun 18, 2020
by
Sanad Liaquat (Personal)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Recreate project if Readme is missing
parent
488e0370
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
9 deletions
+17
-9
qa/qa/resource/project.rb
qa/qa/resource/project.rb
+5
-1
qa/qa/specs/features/ee/browser_ui/1_manage/group/group_file_template_spec.rb
.../ee/browser_ui/1_manage/group/group_file_template_spec.rb
+12
-8
No files found.
qa/qa/resource/project.rb
View file @
d2700a47
...
...
@@ -96,7 +96,11 @@ module QA
end
def
has_file?
(
file_path
)
repository_tree
.
any?
{
|
file
|
file
[
:path
]
==
file_path
}
response
=
repository_tree
raise
ResourceNotFoundError
,
"
#{
response
[
:message
]
}
"
if
response
.
is_a?
(
Hash
)
&&
response
.
has_key?
(
:message
)
response
.
any?
{
|
file
|
file
[
:path
]
==
file_path
}
end
def
api_get_path
...
...
qa/qa/specs/features/ee/browser_ui/1_manage/group/group_file_template_spec.rb
View file @
d2700a47
...
...
@@ -52,14 +52,18 @@ module QA
group
.
api_client
=
@api_client
end
@file_template_project
=
Resource
::
Project
.
fabricate_via_api!
do
|
project
|
project
.
group
=
@group
project
.
name
=
'group-file-template-project'
project
.
description
=
'Add group file templates'
project
.
auto_devops_enabled
=
false
project
.
initialize_with_readme
=
true
project
.
user
=
admin
project
.
api_client
=
@api_client
Support
::
Retrier
.
retry_until
(
retry_on_exception:
true
)
do
@file_template_project
=
Resource
::
Project
.
fabricate_via_api!
do
|
project
|
project
.
group
=
@group
project
.
name
=
'group-file-template-project'
project
.
description
=
'Add group file templates'
project
.
auto_devops_enabled
=
false
project
.
initialize_with_readme
=
true
project
.
user
=
admin
project
.
api_client
=
@api_client
end
@file_template_project
.
has_file?
(
"README.md"
)
end
Resource
::
Repository
::
Commit
.
fabricate_via_api!
do
|
commit
|
...
...
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