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
16dc492b
Commit
16dc492b
authored
Oct 08, 2020
by
Markus Koller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use repository.shard instead of repository_storage
parent
99cc4f17
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
ee/app/models/group_wiki.rb
ee/app/models/group_wiki.rb
+1
-1
ee/spec/models/group_wiki_spec.rb
ee/spec/models/group_wiki_spec.rb
+4
-4
No files found.
ee/app/models/group_wiki.rb
View file @
16dc492b
...
...
@@ -9,7 +9,7 @@ class GroupWiki < Wiki
super
storage_record
=
container
.
group_wiki_repository
||
container
.
build_group_wiki_repository
storage_record
.
update!
(
shard_name:
repository
_storage
,
disk_path:
storage
.
disk_path
)
storage_record
.
update!
(
shard_name:
repository
.
shard
,
disk_path:
storage
.
disk_path
)
end
override
:storage
...
...
ee/spec/models/group_wiki_spec.rb
View file @
16dc492b
...
...
@@ -13,7 +13,10 @@ RSpec.describe GroupWiki do
describe
'#create_wiki_repository'
do
before
do
# Don't actually create the repository, because we're using storage shards that don't exist.
# Use a custom storage shard value, to make sure we're not falling back to the default.
allow
(
subject
).
to
receive
(
:repository_storage
).
and_return
(
'foo'
)
# Don't actually create the repository, because the storage shard doesn't exist.
allow
(
subject
.
repository
).
to
receive
(
:create_if_not_exists
)
allow
(
subject
).
to
receive
(
:repository_exists?
).
and_return
(
true
)
end
...
...
@@ -27,8 +30,6 @@ RSpec.describe GroupWiki do
end
it
'tracks the storage location'
do
expect
(
subject
).
to
receive
(
:repository_storage
).
and_return
(
'foo'
)
subject
.
create_wiki_repository
expect
(
wiki_container
.
group_wiki_repository
).
to
have_attributes
(
...
...
@@ -44,7 +45,6 @@ RSpec.describe GroupWiki do
end
it
'updates the storage location'
do
expect
(
subject
).
to
receive
(
:repository_storage
).
and_return
(
'foo'
)
expect
(
subject
.
storage
).
to
receive
(
:disk_path
).
and_return
(
'fancy/new/path'
)
subject
.
create_wiki_repository
...
...
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