Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-shell
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
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-shell
Commits
8454d8dc
Commit
8454d8dc
authored
May 18, 2013
by
ash
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Specs for logging during failure cases of fork-project.
parent
de4349c1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
1 deletion
+15
-1
spec/gitlab_projects_spec.rb
spec/gitlab_projects_spec.rb
+15
-1
No files found.
spec/gitlab_projects_spec.rb
View file @
8454d8dc
...
@@ -131,7 +131,15 @@ describe GitlabProjects do
...
@@ -131,7 +131,15 @@ describe GitlabProjects do
gl_projects_import
.
exec
gl_projects_import
.
exec
end
end
it
"should not fork without a destination namespace"
do
missing_arg
=
build_gitlab_projects
(
'fork-project'
,
source_repo_name
)
$logger
.
should_receive
(
:error
).
with
(
"fork-project failed: no destination namespace provided."
)
missing_arg
.
exec
.
should
be_false
end
it
"should not fork into a namespace that doesn't exist"
do
it
"should not fork into a namespace that doesn't exist"
do
message
=
"fork-project failed: destination namespace <
#{
tmp_repos_path
}
/forked-to-namespace> does not exist."
$logger
.
should_receive
(
:error
).
with
(
message
)
gl_projects_fork
.
exec
.
should
be_false
gl_projects_fork
.
exec
.
should
be_false
end
end
...
@@ -145,7 +153,13 @@ describe GitlabProjects do
...
@@ -145,7 +153,13 @@ describe GitlabProjects do
end
end
it
"should not fork if a project of the same name already exists"
do
it
"should not fork if a project of the same name already exists"
do
#trying to fork again should fail as the repo already exists
# create a fake project at the intended destination
FileUtils
.
mkdir_p
(
File
.
join
(
tmp_repos_path
,
'forked-to-namespace'
,
repo_name
))
# trying to fork again should fail as the repo already exists
message
=
"fork-project failed: destination repository <
#{
tmp_repos_path
}
/forked-to-namespace/
#{
repo_name
}
> "
message
<<
"already exists."
$logger
.
should_receive
(
:error
).
with
(
message
)
gl_projects_fork
.
exec
.
should
be_false
gl_projects_fork
.
exec
.
should
be_false
end
end
...
...
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