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
5d1391b6
Commit
5d1391b6
authored
Jan 05, 2018
by
Jacob Vosmaer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix specs
parent
176b60d1
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
11 deletions
+15
-11
spec/models/namespace_spec.rb
spec/models/namespace_spec.rb
+7
-3
spec/models/project_spec.rb
spec/models/project_spec.rb
+4
-4
spec/services/projects/create_service_spec.rb
spec/services/projects/create_service_spec.rb
+1
-1
spec/services/projects/hashed_storage/migrate_repository_service_spec.rb
...rojects/hashed_storage/migrate_repository_service_spec.rb
+1
-1
spec/services/projects/transfer_service_spec.rb
spec/services/projects/transfer_service_spec.rb
+2
-2
No files found.
spec/models/namespace_spec.rb
View file @
5d1391b6
...
...
@@ -250,9 +250,13 @@ describe Namespace do
parent
.
update
(
path:
'mygroup_new'
)
expect
(
project_in_parent_group
.
repo
.
config
[
'gitlab.fullpath'
]).
to
eq
"mygroup_new/
#{
project_in_parent_group
.
path
}
"
expect
(
hashed_project_in_subgroup
.
repo
.
config
[
'gitlab.fullpath'
]).
to
eq
"mygroup_new/mysubgroup/
#{
hashed_project_in_subgroup
.
path
}
"
expect
(
legacy_project_in_subgroup
.
repo
.
config
[
'gitlab.fullpath'
]).
to
eq
"mygroup_new/mysubgroup/
#{
legacy_project_in_subgroup
.
path
}
"
expect
(
project_rugged
(
project_in_parent_group
).
config
[
'gitlab.fullpath'
]).
to
eq
"mygroup_new/
#{
project_in_parent_group
.
path
}
"
expect
(
project_rugged
(
hashed_project_in_subgroup
).
config
[
'gitlab.fullpath'
]).
to
eq
"mygroup_new/mysubgroup/
#{
hashed_project_in_subgroup
.
path
}
"
expect
(
project_rugged
(
legacy_project_in_subgroup
).
config
[
'gitlab.fullpath'
]).
to
eq
"mygroup_new/mysubgroup/
#{
legacy_project_in_subgroup
.
path
}
"
end
def
project_rugged
(
project
)
project
.
repository
.
rugged
end
end
...
...
spec/models/project_spec.rb
View file @
5d1391b6
...
...
@@ -2632,7 +2632,7 @@ describe Project do
project
.
rename_repo
expect
(
project
.
repo
.
config
[
'gitlab.fullpath'
]).
to
eq
(
project
.
full_path
)
expect
(
project
.
repo
sitory
.
rugged
.
config
[
'gitlab.fullpath'
]).
to
eq
(
project
.
full_path
)
end
end
...
...
@@ -2793,7 +2793,7 @@ describe Project do
it
'updates project full path in .git/config'
do
project
.
rename_repo
expect
(
project
.
repo
.
config
[
'gitlab.fullpath'
]).
to
eq
(
project
.
full_path
)
expect
(
project
.
repo
sitory
.
rugged
.
config
[
'gitlab.fullpath'
]).
to
eq
(
project
.
full_path
)
end
end
...
...
@@ -3162,13 +3162,13 @@ describe Project do
it
'writes full path in .git/config when key is missing'
do
project
.
write_repository_config
expect
(
project
.
repo
.
config
[
'gitlab.fullpath'
]).
to
eq
project
.
full_path
expect
(
project
.
repo
sitory
.
rugged
.
config
[
'gitlab.fullpath'
]).
to
eq
project
.
full_path
end
it
'updates full path in .git/config when key is present'
do
project
.
write_repository_config
(
gl_full_path:
'old/path'
)
expect
{
project
.
write_repository_config
}.
to
change
{
project
.
repo
.
config
[
'gitlab.fullpath'
]
}.
from
(
'old/path'
).
to
(
project
.
full_path
)
expect
{
project
.
write_repository_config
}.
to
change
{
project
.
repo
sitory
.
rugged
.
config
[
'gitlab.fullpath'
]
}.
from
(
'old/path'
).
to
(
project
.
full_path
)
end
it
'does not raise an error with an empty repository'
do
...
...
spec/services/projects/create_service_spec.rb
View file @
5d1391b6
...
...
@@ -255,7 +255,7 @@ describe Projects::CreateService, '#execute' do
it
'writes project full path to .git/config'
do
project
=
create_project
(
user
,
opts
)
expect
(
project
.
repo
.
config
[
'gitlab.fullpath'
]).
to
eq
project
.
full_path
expect
(
project
.
repo
sitory
.
rugged
.
config
[
'gitlab.fullpath'
]).
to
eq
project
.
full_path
end
def
create_project
(
user
,
opts
)
...
...
spec/services/projects/hashed_storage/migrate_repository_service_spec.rb
View file @
5d1391b6
...
...
@@ -37,7 +37,7 @@ describe Projects::HashedStorage::MigrateRepositoryService do
it
'writes project full path to .git/config'
do
service
.
execute
expect
(
project
.
repo
.
config
[
'gitlab.fullpath'
]).
to
eq
project
.
full_path
expect
(
project
.
repo
sitory
.
rugged
.
config
[
'gitlab.fullpath'
]).
to
eq
project
.
full_path
end
end
...
...
spec/services/projects/transfer_service_spec.rb
View file @
5d1391b6
...
...
@@ -58,7 +58,7 @@ describe Projects::TransferService do
it
'updates project full path in .git/config'
do
transfer_project
(
project
,
user
,
group
)
expect
(
project
.
repo
.
config
[
'gitlab.fullpath'
]).
to
eq
"
#{
group
.
full_path
}
/
#{
project
.
path
}
"
expect
(
project
.
repo
sitory
.
rugged
.
config
[
'gitlab.fullpath'
]).
to
eq
"
#{
group
.
full_path
}
/
#{
project
.
path
}
"
end
end
...
...
@@ -95,7 +95,7 @@ describe Projects::TransferService do
it
'rolls back project full path in .git/config'
do
attempt_project_transfer
expect
(
project
.
repo
.
config
[
'gitlab.fullpath'
]).
to
eq
project
.
full_path
expect
(
project
.
repo
sitory
.
rugged
.
config
[
'gitlab.fullpath'
]).
to
eq
project
.
full_path
end
it
"doesn't send move notifications"
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