From 25d31cd588f953882afc3008ebc1a602c0537c71 Mon Sep 17 00:00:00 2001 From: ievgenii vdovenko Date: Fri, 1 Aug 2025 11:49:44 +0200 Subject: [PATCH] tests: fixes test_utils and reverts delete repo message --- rhodecode/i18n/rhodecode.pot | 4 ++-- rhodecode/templates/admin/repos/repo_edit_advanced.mako | 6 +++++- rhodecode/tests/lib/test_utils.py | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/rhodecode/i18n/rhodecode.pot b/rhodecode/i18n/rhodecode.pot index 26318954..118e3805 100644 --- a/rhodecode/i18n/rhodecode.pot +++ b/rhodecode/i18n/rhodecode.pot @@ -7567,8 +7567,8 @@ msgstr "" msgid "Delete this repository" msgstr "" -#: rhodecode/templates/admin/repos/repo_edit_advanced.mako:242 -msgid "Warning: You are about to delete the repository. This action cannot be undone!" +#: rhodecode/templates/admin/repos/repo_edit_advanced.mako:249 +msgid "This repository will be renamed in a special way in order to make it inaccessible to RhodeCode Enterprise and its VCS systems. If you need to fully delete it from the file system, please do it manually, or with rhodecode-cleanup-repos command available in rhodecode-tools." msgstr "" #: rhodecode/templates/admin/repos/repo_edit_advanced.mako:276 diff --git a/rhodecode/templates/admin/repos/repo_edit_advanced.mako b/rhodecode/templates/admin/repos/repo_edit_advanced.mako index dd920288..e3ade58b 100644 --- a/rhodecode/templates/admin/repos/repo_edit_advanced.mako +++ b/rhodecode/templates/admin/repos/repo_edit_advanced.mako @@ -246,7 +246,11 @@ ${_('Delete this repository')} - +
+ + ${_('This repository will be renamed in a special way in order to make it inaccessible to RhodeCode Enterprise and its VCS systems. If you need to fully delete it from the file system, please do it manually, or with rhodecode-cleanup-repos command available in rhodecode-tools.')} + +
${h.end_form()} diff --git a/rhodecode/tests/lib/test_utils.py b/rhodecode/tests/lib/test_utils.py index 7f96f5c2..775bdb7b 100644 --- a/rhodecode/tests/lib/test_utils.py +++ b/rhodecode/tests/lib/test_utils.py @@ -293,7 +293,7 @@ def test_repo2db_mapper_adds_new_repos(request, backend): for _repo in cleanup_repos: del_result = RepoModel().delete(_repo, call_events=False) Session().commit() - assert del_result is True + assert del_result.is_success is True for _repo_group in cleanup_groups: del_result = RepoGroupModel().delete(_repo_group, force_delete=True, call_events=False)