This instance will be upgraded to Heptapod 0.27.1 on 2021-12-08 at 22:00 UTC+1 (a few minutes of down time)

Commit 95a270c8 authored by Gabriel Mazetto's avatar Gabriel Mazetto
Browse files

Fix repository reloading in some specs

parent 2cefdb0ebafc
......@@ -478,6 +478,10 @@ def repository
@repository ||= Repository.new(full_path, self, disk_path: disk_path)
end
def reload_repository!
@repository = nil
end
def container_registry_url
if Gitlab.config.registry.enabled
"#{Gitlab.config.registry.host_port}/#{full_path.downcase}"
......
......@@ -47,11 +47,11 @@ def rename_repo
project.send_move_instructions(old_path_with_namespace)
@old_path_with_namespace = old_path_with_namespace
project.old_path_with_namespace = old_path_with_namespace
SystemHooksService.new.execute_hooks_for(project, :rename)
@repository = nil
project.reload_repository!
rescue => e
Rails.logger.error "Exception renaming #{old_path_with_namespace} -> #{new_path_with_namespace}: #{e}"
# Returning false does not rollback after_* transaction but gives
......
......@@ -52,11 +52,11 @@ def rename_repo
project.send_move_instructions(old_path_with_namespace)
project.expires_full_path_cache
@old_path_with_namespace = old_path_with_namespace
project.old_path_with_namespace = old_path_with_namespace
SystemHooksService.new.execute_hooks_for(project, :rename)
@repository = nil
project.reload_repository!
rescue => e
Rails.logger.error "Exception renaming #{old_path_with_namespace} -> #{new_path_with_namespace}: #{e}"
# Returning false does not rollback after_* transaction but gives
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment