From ba800e8f7a27d5d3e6ac071f39a7da80216f141b Mon Sep 17 00:00:00 2001 From: Florent Date: Mon, 15 Jan 2024 08:53:32 +0100 Subject: [PATCH] Add tests.toml --- tests.toml | 96 ++++++++++++++++++------------------------------------ 1 file changed, 32 insertions(+), 64 deletions(-) diff --git a/tests.toml b/tests.toml index 76f5804..971645e 100644 --- a/tests.toml +++ b/tests.toml @@ -1,78 +1,46 @@ -#:schema https://raw.githubusercontent.com/YunoHost/apps/master/schemas/tests.v1.schema.json - test_format = 1.0 [default] - # ------------ - # Tests to run - # ------------ +# ------------ +# Tests to run +# ------------ - # ------------------------------------------------------------------------------- - # EVERYTHING PAST THIS POINT IS OPTIONAL AND MOST LIKELY UNNECESSARY FOR NEW APPS - #-------------------------------------------------------------------------------- - ## Conventions in this sample: - ## <- An actual comment - # <- uncommenting this should be a valid entry in 'tests.toml' +# For special usecases, sometimes you need to setup other things on the machine +# prior to installing the app (such as installing another app) +# (Remove this key entirely if not needed) +preinstall = """ + sudo yunohost tools update apps + sudo yunohost app install https://github.com/YunoHost-Apps/synapse_ynh/ -a "domain=$domain&server_name=$server_name&is_free_registration=$is_free_registration&jitsi_server=$jitsi_server" --force + """ - ## NB: the tests to run are automatically deduced by the CI script according to the - ## content of the app's manifest. The declarations below allow to customize which - ## tests are ran, possibly add special test suite to test special args, or - ## declare which commits to test upgrade from. - ## - ## You can also decide (though this is discouraged!) to ban/ignore some tests, - ## The test IDs to be used in only/exclude statements are: - ## * install.root - ## * install.subdir - ## * install.nourl - ## * install.multi - ## * backup_restore - ## * upgrade - ## * upgrade.someCommitId - ## * change_url - ## NB: you should NOT need this except if you really have a good reason... +# ------------------------------- +# Default args to use for install +# ------------------------------- - # exclude = ["install.private", "install.multi"] +# By default, the CI will automagically fill the 'standard' args +# such as domain, path, admin, is_public and password with relevant values +# and also install args with a "default" provided in the manifest.. +# It should only make sense to declare custom args here for args with no default values - ## For special usecases, sometimes you need to setup other things on the machine - ## prior to installing the app (such as installing another app) - ## (Remove this key entirely if not needed) - - # preinstall = """ - # sudo yunohost app install foobar - # sudo yunohost user list - # """ +args.botadmin = "@johndoe:server.name" +args.botusers = "server.name" - # ------------------------------- - # Default args to use for install - # ------------------------------- +# ------------------------------- +# Commits to test upgrade from +# ------------------------------- - ## By default, the CI will automagically fill the 'standard' args - ## such as domain, path, admin, is_public and password with relevant values - ## and also install args with a "default" provided in the manifest.. - ## It should only make sense to declare custom args here for args with no default values - ## NB: you should NOT need those lines unless for custom questions with no obvious/default value +# This is an additional test suite +[multiple_botusers] - # args.language = "fr_FR" - # args.multisite = 0 +preinstall = """ + sudo yunohost tools update apps + sudo yunohost app install https://github.com/YunoHost-Apps/synapse_ynh/ -a "domain=$domain&server_name=$server_name&is_free_registration=$is_free_registration&jitsi_server=$jitsi_server" --force + """ - # ------------------------------- - # Commits to test upgrade from - # ------------------------------- - - ## 00a1a6e7 is part of commit SHA, preferrably from 'master' branch - ## that points to valid install of previous version +# On additional tests suites, you can decide to run only specific tests - # test_upgrade_from.00a1a6e7.name = "Upgrade from 5.4" - # test_upgrade_from.00a1a6e7.args.foo = "bar" +only = ["install.subdir"] - -## This is an additional test suite -# [some_additional_testsuite] - - ## On additional tests suites, you can decide to run only specific tests - - # only = ["install.subdir"] - - # args.language = "en_GB" - # args.multisite = 1 +args.botadmin = "@johndoe:server.name" +args.botusers = "@john:server.name,@jdoe:server.name,@janedoe:server.name"