Compare commits
1 Commits
main
...
ci/d4-reci
| Author | SHA1 | Date | |
|---|---|---|---|
| 1eb791c1db |
12
tests/test_recipe_local.py
Normal file
12
tests/test_recipe_local.py
Normal file
@ -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"
|
||||||
Reference in New Issue
Block a user