Report (as info) ynh_script_progression during backup

This commit is contained in:
Alexandre Aubin 2020-11-28 18:49:05 +01:00
parent ee3d38c177
commit 8447af9142

View file

@ -1413,6 +1413,18 @@ class Script(TestSuite):
"during the installation. (and ideally in scripts remove, upgrade and restore too)" "during the installation. (and ideally in scripts remove, upgrade and restore too)"
) )
@test(only=["backup"])
def progression_in_backup(self):
if self.contains("ynh_script_progression"):
yield Info(
"We recommend to *not* use 'ynh_script_progression' in backup "
"scripts because no actual work happens when running the script "
" : yunohost only fetches the list of things to backup (apart "
"from the DB dumps which effectively happens during the script..). "
"Consider using a simple message like this instead: 'ynh_print_info \"Declaring files to be backed up...\"'"
)
@test() @test()
def progression_time(self): def progression_time(self):