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
327e2e13
Commit
327e2e13
authored
Mar 30, 2022
by
Mayra Cabrera
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'release-tools/update-gitaly' into 'master'
Update Gitaly version See merge request gitlab-org/gitlab!83953
parents
66fb40e3
91a01489
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
71 deletions
+1
-71
GITALY_SERVER_VERSION
GITALY_SERVER_VERSION
+1
-1
spec/support/shared_examples/workers/concerns/git_garbage_collect_methods_shared_examples.rb
...s/concerns/git_garbage_collect_methods_shared_examples.rb
+0
-70
No files found.
GITALY_SERVER_VERSION
View file @
327e2e13
cc42cf8f28dc37bf808dabaac8a055a84b83a5db
8b95897d918a4fefdc0542a72121182cd1f27f8f
spec/support/shared_examples/workers/concerns/git_garbage_collect_methods_shared_examples.rb
View file @
327e2e13
...
...
@@ -230,76 +230,6 @@ RSpec.shared_examples 'can collect git garbage' do |update_statistics: true|
stub_feature_flags
(
optimized_housekeeping:
false
)
end
it
'incremental repack adds a new packfile'
do
create_objects
(
resource
)
before_packs
=
packs
(
resource
)
expect
(
before_packs
.
count
).
to
be
>=
1
subject
.
perform
(
resource
.
id
,
'incremental_repack'
,
lease_key
,
lease_uuid
)
after_packs
=
packs
(
resource
)
# Exactly one new pack should have been created
expect
(
after_packs
.
count
).
to
eq
(
before_packs
.
count
+
1
)
# Previously existing packs are still around
expect
(
before_packs
&
after_packs
).
to
eq
(
before_packs
)
end
it
'full repack consolidates into 1 packfile'
do
create_objects
(
resource
)
subject
.
perform
(
resource
.
id
,
'incremental_repack'
,
lease_key
,
lease_uuid
)
before_packs
=
packs
(
resource
)
expect
(
before_packs
.
count
).
to
be
>=
2
subject
.
perform
(
resource
.
id
,
'full_repack'
,
lease_key
,
lease_uuid
)
after_packs
=
packs
(
resource
)
expect
(
after_packs
.
count
).
to
eq
(
1
)
# Previously existing packs should be gone now
expect
(
after_packs
-
before_packs
).
to
eq
(
after_packs
)
expect
(
File
.
exist?
(
bitmap_path
(
after_packs
.
first
))).
to
eq
(
bitmaps_enabled
)
end
it
'gc consolidates into 1 packfile and updates packed-refs'
do
create_objects
(
resource
)
before_packs
=
packs
(
resource
)
before_packed_refs
=
packed_refs
(
resource
)
expect
(
before_packs
.
count
).
to
be
>=
1
# It's quite difficult to use `expect_next_instance_of` in this place
# because the RepositoryService is instantiated several times to do
# some repository calls like `exists?`, `create_repository`, ... .
# Therefore, since we're instantiating the object several times,
# RSpec has troubles figuring out which instance is the next and which
# one we want to mock.
# Besides, at this point, we actually want to perform the call to Gitaly,
# otherwise we would just use `instance_double` like in other parts of the
# spec file.
expect_any_instance_of
(
Gitlab
::
GitalyClient
::
RepositoryService
)
# rubocop:disable RSpec/AnyInstanceOf
.
to
receive
(
:garbage_collect
)
.
with
(
bitmaps_enabled
,
prune:
false
)
.
and_call_original
subject
.
perform
(
resource
.
id
,
'gc'
,
lease_key
,
lease_uuid
)
after_packed_refs
=
packed_refs
(
resource
)
after_packs
=
packs
(
resource
)
expect
(
after_packs
.
count
).
to
eq
(
1
)
# Previously existing packs should be gone now
expect
(
after_packs
-
before_packs
).
to
eq
(
after_packs
)
# The packed-refs file should have been updated during 'git gc'
expect
(
before_packed_refs
).
not_to
eq
(
after_packed_refs
)
expect
(
File
.
exist?
(
bitmap_path
(
after_packs
.
first
))).
to
eq
(
bitmaps_enabled
)
end
it
'cleans up repository after finishing'
do
expect
(
resource
).
to
receive
(
:cleanup
).
and_call_original
...
...
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