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
17c2692f
Commit
17c2692f
authored
Jan 05, 2018
by
LUKE BENNETT
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resolve project_spec.rb
parent
c8498814
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
16 deletions
+9
-16
spec/models/project_spec.rb
spec/models/project_spec.rb
+9
-16
No files found.
spec/models/project_spec.rb
View file @
17c2692f
...
...
@@ -3547,7 +3547,7 @@ describe Project do
end
end
<<<<<<<
HEAD
describe
'#root_namespace'
do
let
(
:project
)
{
build
(
:project
,
namespace:
parent
)
}
...
...
@@ -3573,27 +3573,20 @@ describe Project do
describe
'#deployment_platform'
do
subject
{
project
.
deployment_platform
}
=======
describe
'#write_repository_config'
do
set
(
:project
)
{
create
(
:project
,
:repository
)
}
>>>>>>>
upstream
/
master
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
end
let
(
:project
)
{
create
(
:project
)
}
it
'updates full path in .git/config when key is present
'
do
project
.
write_repository_config
(
gl_full_path:
'old/path'
)
context
'when user configured kubernetes from Integration > Kubernetes
'
do
let!
(
:kubernetes_service
)
{
create
(
:kubernetes_service
,
project:
project
)
}
expect
{
project
.
write_repository_config
}.
to
change
{
project
.
repo
.
config
[
'gitlab.fullpath'
]
}.
from
(
'old/path'
).
to
(
project
.
full_path
)
it
{
is_expected
.
to
eq
(
kubernetes_service
)
}
end
it
'does not raise an error with an empty repository'
do
project
=
create
(
:project_empty_repo
)
context
'when user configured kubernetes from CI/CD > Clusters'
do
let!
(
:cluster
)
{
create
(
:cluster
,
:provided_by_gcp
,
projects:
[
project
])
}
let
(
:platform_kubernetes
)
{
cluster
.
platform_kubernetes
}
expect
{
project
.
write_repository_config
}.
not_to
raise_error
it
{
is_expected
.
to
eq
(
platform_kubernetes
)
}
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