OCA / server-tools

Tools for Odoo Administrators to improve some technical features on Odoo.
https://odoo-community.org/psc-teams/tools-30
GNU Affero General Public License v3.0
705 stars 1.5k forks source link

[16.0] auto_backup: Tests fail #3066

Closed BT-anieto closed 1 month ago

BT-anieto commented 1 month ago

I have a failing tests in a PR related to auto_backup module.

Module

auto_backup

Describe the bug

Tests are failing. Check, for example, this PR: #3061

mathben commented 1 month ago

More information from log https://github.com/OCA/server-tools/actions/runs/11273741765/job/31351416123?pr=3061

 2024-10-10 12:17:22,354 406 ERROR odoo odoo.addons.auto_backup.models.db_backup: Action backup - OSError: [Errno 17] File exists: '/github/home/.local/share/Odoo/backups/odoo' 
Traceback (most recent call last):
  File "/__w/server-tools/server-tools/auto_backup/models/db_backup.py", line 157, in action_backup
    os.makedirs(rec.folder)
  File "/usr/lib/python3.10/os.py", line 225, in makedirs
    mkdir(name, mode)
FileExistsError: [Errno 17] File exists: '/github/home/.local/share/Odoo/backups/odoo'
2024-10-10 12:17:24,020 406 ERROR odoo odoo.addons.auto_backup.models.db_backup: pysftp ConnectionException: ('test', 'test') 
Traceback (most recent call last):
  File "/__w/server-tools/server-tools/auto_backup/models/db_backup.py", line 189, in action_backup
    remote.makedirs(rec.folder)
  File "/usr/lib/python3.10/unittest/mock.py", line 1114, in __call__
    return self._mock_call(*args, **kwargs)
  File "/usr/lib/python3.10/unittest/mock.py", line 1118, in _mock_call
    return self._execute_mock_call(*args, **kwargs)
  File "/usr/lib/python3.10/unittest/mock.py", line 1173, in _execute_mock_call
    raise effect
odoo.addons.auto_backup.tests.test_db_backup.TestConnectionException: ('test', 'test')