coquelicot: Enable backup/restore

Reviewed-by: James Valleroy <jvalleroy@mailbox.org>
This commit is contained in:
Joseph Nuthalapati 2018-10-02 10:38:59 -07:00 committed by James Valleroy
parent 8a2e27e8e0
commit 95664015ac
No known key found for this signature in database
GPG Key ID: 77C0C75E7B650808
3 changed files with 26 additions and 2 deletions

View File

@ -15,7 +15,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
#
@apps @coquelicot
@apps @coquelicot @backups
Feature: Coquelicot File Sharing
Run Coquelicot File Sharing server.
@ -47,3 +47,16 @@ Scenario: Modify maximum upload size in disabled case
Given the coquelicot application is disabled
When I modify the maximum file size of coquelicot to 123
Then the coquelicot service should not be running
Scenario: Backup and restore coquelicot
Given the coquelicot application is enabled
When I modify the coquelicot upload password to beforebackup123
And I modify the maximum file size of coquelicot to 128
And I create a backup of the coquelicot app data
And I export the coquelicot app data backup
And I modify the coquelicot upload password to afterbackup123
And I modify the maximum file size of coquelicot to 64
And I restore the coquelicot app data backup
Then the coquelicot service should be running
And I should be able to login to coquelicot with password beforebackup123
And the maximum file size of coquelicot should be 128

View File

@ -24,7 +24,7 @@ from plinth import service as service_module
from plinth import action_utils, actions, frontpage
from plinth.menu import main_menu
from .manifest import clients
from .manifest import backup, clients
clients = clients

View File

@ -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_backups
clients = validate([{
'name': _('coquelicot'),
@ -26,3 +27,13 @@ clients = validate([{
'url': '/coquelicot'
}]
}])
backup = validate_backups({
'data': {
'directories': ['/var/lib/coquelicot']
},
'secrets': {
'files': ['/etc/coquelicot/settings.yml']
},
'services': ['coquelicot']
})