From e70429a0ab4fea3de2a6053429f99a66440f83db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sat, 25 Nov 2023 19:58:09 +0100 Subject: [PATCH] fix --- manifest.json | 160 -------------------------------------------------- tests.toml | 20 +++++++ 2 files changed, 20 insertions(+), 160 deletions(-) delete mode 100644 manifest.json create mode 100644 tests.toml diff --git a/manifest.json b/manifest.json deleted file mode 100644 index 41e28c8..0000000 --- a/manifest.json +++ /dev/null @@ -1,160 +0,0 @@ -{ - "name": "Restic", - "id": "restic", - "packaging_format": 1, - "description": { - "en": "Backup your server with Restic", - "fr": "Sauvegardez votre serveur avec Restic" - }, - "version": "0.12.0~ynh9", - "url": "https://restic.net/", - "upstream": { - "license": "BSD-2-Clause", - "website": "https://restic.net", - "admindoc": "https://restic.readthedocs.io/en/latest/", - "code": "https://github.com/restic/restic" - }, - "license": "BSD-2-Clause", - "maintainer": { - "name": "Lionel Coupouchetty-Ramouchetty", - "email": "restic-ynh@coupouchetty-ramouchetty.fr", - "url": "https://gnoobix.net" - }, - "requirements": { - "yunohost": ">= 11.2" - }, - "multi_instance": true, - "services": [], - "arguments": { - "install" : [ - { - "name": "server", - "type": "string", - "ask": { - "en": "Indicate the server where you want put your backups", - "fr": "Indiquez le serveur où vous voulez faire vos sauvegardes" - }, - "help":{ - "en": "IP address or resolvable hostname of your destination server", - "fr": "Adresse IP ou nom résolvable de votre serveur de destination" - }, - "example": "example.com" - }, - { - "name": "port", - "type": "string", - "ask": { - "en": "sftp port of your server", - "fr": "Le port sftp de votre serveur" - }, - "help":{ - "en": "Listening port of your sftp or ssh server. The default value is 22", - "fr": "Le port d'écoute de votre serveur sftp ou ssh. La valeur par défaut est 22" - }, - "example": "22", - "default": "22" - }, - { - "name": "backup_path", - "type": "string", - "ask": { - "en": "The directory where you want your backup repositories to be created in", - "fr": "Le répertoire dans lequel les dépôts restic seront créés" - }, - "help":{ - "en": "A complete or relative path to an existing directory on the remote server writable by the remote backup user. Defaults to the login directory", - "fr": "Un chemin complet ou relatif vers un répertoire existant sur le serveur distant et accessible en écriture au compte utilisé pour la sauvegarde. Répertoire d'accueil par défaut" - }, - "example": "./backups", - "default": "." - }, - { - "name": "ssh_user", - "type": "string", - "ask": { - "en": "Indicate the ssh user to use to connect on this server", - "fr": "Indiquez l'utilisateur ssh à utiliser pour se connecter au serveur" - }, - "example": "john" - }, - { - "name": "passphrase", - "type": "password", - "ask": { - "en": "Indicate a strong passphrase, that you will keep preciously if you want to be able to use your backups", - "fr": "Indiquez une phrase de passe forte que vous garderez précieusement si vous voulez être en mesure d'utiliser vos sauvegardes" - } - }, - { - "name": "conf", - "type": "boolean", - "ask": { - "en": "Would you like to backup your YunoHost configuration ?", - "fr": "Souhaitez-vous effectuer des sauvegardes des configurations du système YunoHost ?" - }, - "default": true - }, - { - "name": "data", - "type": "boolean", - "ask": { - "en": "Would you like to backup mails and user home directory ?", - "fr": "Souhaitez-vous effectuer des sauvegardes des mails et des répertoire des utilisateurs ?" - }, - "default": true - }, - { - "name": "apps", - "type": "string", - "ask": { - "en": "Which apps would you backup (list separated by comma or 'all') ?", - "fr": "Souhaitez-vous effectuer des sauvegardes de vos applications ?" - }, - "default": "all" - }, - { - "name": "allow_extra_space_use", - "type": "boolean", - "ask": { - "en": "Allow backup method to temporarily use more space?", - "fr": "Permettre à la sauvegarde de consommer temporairement de l'espace supplémentaire?" - }, - "help":{ - "en": "Some applications as Gitlab can't be backed up with the standard method and require extra space temporarily", - "fr": "Certaines applications comme Gitlab ne peuvent être sauvegardées avec la méthode standard et nécessitent d'utiliser plus d'espace disque temporairement" - }, - "default": true - }, - { - "name": "on_calendar", - "type": "string", - "ask": { - "en": "Indicate the backup frequency (see systemd OnCalendar format)", - "fr": "Indiquez la fréquence de la sauvegarde (voir le format OnCalendar de systemd)" - }, - "example": "Daily", - "default": "*-*-* 0:15:00" - }, - { - "name": "check_on_calendar", - "type": "string", - "ask": { - "en": "Indicate the backup check frequency (see systemd OnCalendar format)", - "fr": "Indiquez la fréquence de vérification de la sauvegarde (voir le format OnCalendar de systemd)" - }, - "example": "Tue *-*-* 00:15:00", - "default": "Sat *-*-8..31 3:15:00" - }, - { - "name": "check_read_data_on_calendar", - "type": "string", - "ask": { - "en": "Indicate the complete backup check frequency (see systemd OnCalendar format)", - "fr": "Indiquez la fréquence de vérification complète de la sauvegarde (voir le format OnCalendar de systemd)" - }, - "example": "Tue *-*-* 00:15:00", - "default": "Sat *-*-1..7 3:15:00" - } - ] - } -} diff --git a/tests.toml b/tests.toml new file mode 100644 index 0000000..e9e6d93 --- /dev/null +++ b/tests.toml @@ -0,0 +1,20 @@ +test_format = 1.0 + +[default] + + # ------------ + # Tests to run + # ------------ + + args.server = "dst.domain.tld" + args.ssh_user = "sam" + args.passphrase = "APassphrase" + args.conf = 1 + args.port = 2222 + args.backup_path = "src.domain.tld" + args.data = 1 + args.app = "all" + args.allow_extra_space_use = 1 + args.on_calendar = "Daily" + args.check_on_calendar = "*-*-8,15,22 3:15" + args.check_read_data_on_calendar = "*-*-1 3:15" \ No newline at end of file