1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/redirect_ynh.git synced 2024-09-03 20:16:10 +02:00
redirect_ynh/tests.toml
Alexandre Aubin 62c1bdfdcc Merp
2024-01-06 18:12:31 +01:00

81 lines
1.9 KiB
TOML

#:schema https://raw.githubusercontent.com/YunoHost/apps/master/schemas/tests.v1.schema.json
test_format = 1.0
[default]
args.redirect_type = "redirect"
args.target = "https://127.0.0.1"
# Turns out 302 redirects cant be made private because they are interpreted before going through the sso ...
exclude = ["install.private"]
[default.test_upgrade_from.09cf1c6b]
name = "v1 era"
args.domain = "domain.tld"
args.path = "/"
args.redirect_type = "visible_302"
args.redirect_path = "https://127.0.0.1"
args.is_public = true
[reverseproxy]
args.redirect_type = "reverseproxy"
args.target = "http://127.0.0.1:1234"
exclude = ["install.private", "install.multi", "backup_restore", "change_url"]
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
systemctl enable whatever --now
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
systemctl enable whatever --now
true
"""
[reverseproxy.test_upgrade_from.09cf1c6b]
name = "v1 era"
args.domain = "domain.tld"
args.path = "/"
args.redirect_type = "proxy"
args.redirect_path = "http://127.0.0.1:1234"
args.is_public = true