From 1eb791c1dbd37e5586ffd061abcdd5edcbb6138b Mon Sep 17 00:00:00 2001 From: autonomic-bot Date: Wed, 27 May 2026 00:36:43 +0000 Subject: [PATCH] test: recipe-local CI test (D4 demo) --- tests/test_recipe_local.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 tests/test_recipe_local.py diff --git a/tests/test_recipe_local.py b/tests/test_recipe_local.py new file mode 100644 index 0000000..d8dce2a --- /dev/null +++ b/tests/test_recipe_local.py @@ -0,0 +1,12 @@ +"""Recipe-local test shipped by the recipe repo (D4). Runs against the LIVE deployment via the +cc-ci contract env vars CCCI_BASE_URL / CCCI_APP_DOMAIN.""" +import os, ssl, urllib.request + + +def test_recipe_local_serves_content(): + base = os.environ["CCCI_BASE_URL"] + ctx = ssl.create_default_context(); ctx.check_hostname = False; ctx.verify_mode = ssl.CERT_NONE + with urllib.request.urlopen(base, timeout=15, context=ctx) as r: + body = r.read().decode(errors="replace") + assert r.status == 200 + assert "nginx" in body.lower(), "recipe-local: expected the served nginx page"