2023-12-12 17:06:16 +01:00
|
|
|
#:schema https://raw.githubusercontent.com/YunoHost/apps/master/schemas/tests.v1.schema.json
|
|
|
|
|
2023-09-26 21:36:36 +02:00
|
|
|
test_format = 1.0
|
|
|
|
|
|
|
|
[default]
|
|
|
|
|
2024-01-02 17:43:58 +01:00
|
|
|
args.redirect_type = "redirect"
|
|
|
|
args.target = "https://127.0.0.1"
|
2023-12-31 18:50:07 +01:00
|
|
|
|
2024-01-02 17:43:58 +01:00
|
|
|
# Turns out 302 redirects cant be made private because they are interpreted before going through the sso ...
|
|
|
|
exclude = ["install.private"]
|
2023-09-26 21:36:36 +02:00
|
|
|
|
2023-12-12 17:06:16 +01:00
|
|
|
[default.test_upgrade_from.09cf1c6b]
|
|
|
|
name = "v1 era"
|
|
|
|
args.domain = "domain.tld"
|
2023-12-31 18:50:07 +01:00
|
|
|
args.path = "/"
|
2024-01-02 17:43:58 +01:00
|
|
|
args.redirect_type = "visible_302"
|
|
|
|
args.redirect_path = "https://127.0.0.1"
|
2023-12-31 18:50:07 +01:00
|
|
|
args.is_public = true
|
2023-12-05 01:01:08 +01:00
|
|
|
|
2024-01-02 17:43:58 +01:00
|
|
|
[reverseproxy]
|
2023-12-05 01:01:08 +01:00
|
|
|
|
2024-01-02 17:43:58 +01:00
|
|
|
args.redirect_type = "reverseproxy"
|
|
|
|
args.target = "http://127.0.0.1:1234"
|
2023-12-05 01:08:20 +01:00
|
|
|
|
2024-01-02 17:43:58 +01:00
|
|
|
exclude = ["install.private", "install.multi", "backup_restore", "change_url"]
|
2023-12-05 01:01:08 +01:00
|
|
|
|
2024-01-06 17:08:06 +01:00
|
|
|
preinstall = """
|
|
|
|
cat << EOF > /etc/systemd/system/whatever.service
|
|
|
|
[Unit]
|
|
|
|
Description=Whatever
|
|
|
|
After=network.target
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
WorkingDirectory=/redirect/
|
|
|
|
ExecStart=python3 -m http.server -b 127.0.0.1 1234
|
|
|
|
PrivateTmp=true
|
|
|
|
|
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target
|
|
|
|
EOF
|
|
|
|
|
|
|
|
mkdir -p /redirect
|
|
|
|
mkdir -p /redirect/path
|
|
|
|
echo "helloworld" > /redirect/index.html
|
|
|
|
echo "helloworld" > /redirect/path/index.html
|
|
|
|
systemctl daemon-reload
|
|
|
|
ynh_systemd_action --service_name=whatever --action=enable
|
|
|
|
ynh_systemd_action --service_name=whatever --action=restart
|
|
|
|
true
|
|
|
|
"""
|
|
|
|
preupgrade = """
|
|
|
|
cat << EOF > /etc/systemd/system/whatever.service
|
|
|
|
[Unit]
|
|
|
|
Description=Whatever
|
|
|
|
After=network.target
|
|
|
|
|
|
|
|
[Service]
|
|
|
|
WorkingDirectory=/redirect/
|
|
|
|
ExecStart=python3 -m http.server -b 127.0.0.1 1234
|
|
|
|
PrivateTmp=true
|
|
|
|
|
|
|
|
[Install]
|
|
|
|
WantedBy=multi-user.target
|
|
|
|
EOF
|
|
|
|
|
|
|
|
mkdir -p /redirect
|
|
|
|
mkdir -p /redirect/path
|
|
|
|
echo "helloworld" > /redirect/index.html
|
|
|
|
echo "helloworld" > /redirect/path/index.html
|
|
|
|
systemctl daemon-reload
|
|
|
|
ynh_systemd_action --service_name=whatever --action=enable
|
|
|
|
ynh_systemd_action --service_name=whatever --action=restart
|
|
|
|
true
|
|
|
|
"""
|
|
|
|
|
2024-01-02 17:43:58 +01:00
|
|
|
[reverseproxy.test_upgrade_from.09cf1c6b]
|
2023-12-12 17:06:16 +01:00
|
|
|
name = "v1 era"
|
|
|
|
args.domain = "domain.tld"
|
2023-12-31 18:50:07 +01:00
|
|
|
args.path = "/"
|
2024-01-02 17:43:58 +01:00
|
|
|
args.redirect_type = "proxy"
|
|
|
|
args.redirect_path = "http://127.0.0.1:1234"
|
2023-12-31 18:50:07 +01:00
|
|
|
args.is_public = true
|