Skip to content

Commit f33e119

Browse files
committed
Exercise ACME issuance through the complete 3x-ui-pro installation flow
1 parent e87dc1b commit f33e119

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

‎tests/fresh.sh‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,21 @@ nginx_reload() { return 0; }
2828
nginx_runtime_identity() { return 0; }
2929
managed_permissions() { return 0; } # Fixture runs as the CI user, not root.
3030
ensure_certificate() { return 0; }
31+
if [[ -f $NGINX_ROOT/sites-enabled/80.conf ]]; then
32+
# Exercise ACME -> WEB replan -> manifest -> idempotent load as one install.
33+
# Issuance and challenge reachability are mocked; tests/acme.sh validates
34+
# certificates and tests/nginx.sh serves real challenge requests separately.
35+
ACME_ROOT="$SANDBOX/acme" CERT_ROOT="$SANDBOX/certs"
36+
EMAIL=operator@example.com
37+
validate_certificate() { return 0; }
38+
acme_probe() { return 0; }
39+
certbot() {
40+
mkdir -p "$CERT_ROOT/renewal"
41+
printf '[renewalparams]\nauthenticator = webroot\nwebroot_path = %s,\n' \
42+
"$ACME_ROOT" >"$CERT_ROOT/renewal/$DOMAIN.conf"
43+
}
44+
ensure_certificate() { issue_webroot_certificate; nginx_plan; }
45+
fi
3146
fetch_release() { RELEASE=3.5.9; }
3247
download_candidate() { CANDIDATE="$TMP/candidate"; printf '#!/bin/sh\nexit 0\n' >"$CANDIDATE"; chmod 0755 "$CANDIDATE"; }
3348
getent() { return 2; }

0 commit comments

Comments
 (0)