From 8df5b09d0a0a2b0093c81dea8faef4eefc8fe3bf Mon Sep 17 00:00:00 2001 From: Joseph Nuthalapati Date: Sat, 29 Sep 2018 16:55:07 -0700 Subject: [PATCH] privoxy: Enable backup/restore (no data) Reviewed-by: James Valleroy --- functional_tests/features/privoxy.feature | 9 ++++++++- plinth/modules/privoxy/__init__.py | 2 ++ plinth/modules/privoxy/manifest.py | 23 +++++++++++++++++++++++ 3 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 plinth/modules/privoxy/manifest.py diff --git a/functional_tests/features/privoxy.feature b/functional_tests/features/privoxy.feature index c72a163ac..174af2c97 100644 --- a/functional_tests/features/privoxy.feature +++ b/functional_tests/features/privoxy.feature @@ -15,7 +15,7 @@ # along with this program. If not, see . # -@apps @privoxy +@apps @privoxy @backups Feature: Privoxy Web Proxy Proxy web connections for enhanced privacy. @@ -32,3 +32,10 @@ Scenario: Disable privoxy application Given the privoxy application is enabled When I disable the privoxy application Then the privoxy service should not be running + +Scenario: Backup and restore privoxy + Given the privoxy application is enabled + When I create a backup of the privoxy app data + And I export the privoxy app data backup + And I restore the privoxy app data backup + Then the privoxy service should be running diff --git a/plinth/modules/privoxy/__init__.py b/plinth/modules/privoxy/__init__.py index 197d5e995..e915d8ff8 100644 --- a/plinth/modules/privoxy/__init__.py +++ b/plinth/modules/privoxy/__init__.py @@ -27,6 +27,8 @@ from plinth.menu import main_menu from plinth.utils import format_lazy from plinth.views import ServiceView +from .manifest import backup + version = 1 is_essential = False diff --git a/plinth/modules/privoxy/manifest.py b/plinth/modules/privoxy/manifest.py new file mode 100644 index 000000000..77d523793 --- /dev/null +++ b/plinth/modules/privoxy/manifest.py @@ -0,0 +1,23 @@ +# +# This file is part of FreedomBox. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . +# +""" +Application manifest for privoxy. +""" + +from plinth.modules.backups.api import validate as validate_backup + +backup = validate_backup({})