ASF-injectie 5/5: end-to-end test op de master-host, ASF Website:AuthoredBaseUrl, rooktest-uitbreiding, docs
- ASF appsettings: Website:AuthoredBaseUrl=https://andreaslop.nl, PublicBaseUrl leeg (env). - Api.Tests/AsfInjectionPipelineTests: pagina met markers, echte database; een CMS-wijziging is direct zichtbaar (ETag wijzigt), data-blok == publieke API, 304, sitemap-adres. - smoke-site.sh: onverwerkte CMS-markers op / falen; data-blok moet siteUrl van deze host hebben. - docs: asf-host-injection 'as built'. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -54,6 +54,25 @@ expect_status /api/v1/offerings/all 401 "the administrator list is protected"
|
||||
expect_header / X-Robots-Tag noindex "noindex on the website"
|
||||
expect_body /robots.txt "Disallow: /" "robots.txt disallows everything"
|
||||
|
||||
# The home page is served by the host. When the website build left CMS markers in it, the host must have processed
|
||||
# them: an unprocessed <!--CMS:DATA--> or JSON-LD marker means the page does not go through the injector (a proxy or
|
||||
# IIS serving files itself, or a host without the injection), and a deployed data block must carry this host's address.
|
||||
home="$(curl_get "$base/" || true)"
|
||||
if printf '%s' "$home" | grep -qE '<!--CMS:(DATA|OFFER-JSON-LD)'; then
|
||||
fail "CMS markers on the home page were NOT processed by the host"
|
||||
else
|
||||
pass "no unprocessed CMS markers on the home page"
|
||||
fi
|
||||
if printf '%s' "$home" | grep -q 'id="cms-data"'; then
|
||||
if printf '%s' "$home" | grep -q "\"siteUrl\":\"$base\""; then
|
||||
pass "the data block carries this host's address (siteUrl $base)"
|
||||
else
|
||||
fail "the data block's siteUrl is not $base (is Website__PublicBaseUrl set on this host?)"
|
||||
fi
|
||||
expect_header / ETag '"' "the injected home page has an ETag"
|
||||
expect_header / Cache-Control no-cache "the injected home page is no-cache"
|
||||
fi
|
||||
|
||||
case "$profile" in
|
||||
sls-test)
|
||||
for m in Identity Availability Offerings Contact Master; do expect_module "$m"; done
|
||||
|
||||
Reference in New Issue
Block a user