mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-06-10 11:00:22 +00:00
transmission: Enable backup/restore
Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
parent
eea5d6b754
commit
e001a37449
@ -27,7 +27,6 @@ import sys
|
||||
from plinth import action_utils
|
||||
|
||||
|
||||
SERVICE_CONFIG = '/etc/default/transmission-daemon'
|
||||
TRANSMISSION_CONFIG = '/etc/transmission-daemon/settings.json'
|
||||
|
||||
|
||||
|
||||
@ -38,3 +38,14 @@ Scenario: Upload a torrent to transmission
|
||||
When all torrents are removed from transmission
|
||||
And I upload a sample torrent to transmission
|
||||
Then there should be 1 torrents listed in transmission
|
||||
|
||||
Scenario: Backup and restore transmission
|
||||
Given the transmission application is enabled
|
||||
When all torrents are removed from transmission
|
||||
And I upload a sample torrent to transmission
|
||||
And I create a backup of the transmission app data
|
||||
And I export the transmission app data backup
|
||||
And all torrents are removed from transmission
|
||||
And I restore the transmission app data backup
|
||||
Then the transmission service should be running
|
||||
And there should be 1 torrents listed in transmission
|
||||
|
||||
@ -27,7 +27,7 @@ from plinth import action_utils, actions, frontpage
|
||||
from plinth.menu import main_menu
|
||||
from plinth.modules.users import register_group
|
||||
|
||||
from .manifest import clients
|
||||
from .manifest import backup, clients
|
||||
|
||||
version = 2
|
||||
|
||||
|
||||
@ -18,6 +18,7 @@
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from plinth.clients import validate
|
||||
from plinth.modules.backups.api import validate as validate_backup
|
||||
|
||||
clients = validate([{
|
||||
'name': _('Transmission'),
|
||||
@ -26,3 +27,13 @@ clients = validate([{
|
||||
'url': '/transmission'
|
||||
}]
|
||||
}])
|
||||
|
||||
backup = validate_backup({
|
||||
'data': {
|
||||
'directories': ['/var/lib/transmission-daemon/.config']
|
||||
},
|
||||
'secrets': {
|
||||
'files': ['/etc/transmission-daemon/settings.json']
|
||||
},
|
||||
'services': ['transmission-daemon']
|
||||
})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user