feat: implement Phase 2 (Pulse, Admin, RC2)
This commit is contained in:
58
test_rc2.py
Normal file
58
test_rc2.py
Normal file
@@ -0,0 +1,58 @@
|
||||
import requests
|
||||
import sys
|
||||
|
||||
BASE_URL = "http://localhost:8000"
|
||||
|
||||
def test_rc2():
|
||||
s = requests.Session()
|
||||
|
||||
print("🚀 Verifying RC2 Release Features...")
|
||||
|
||||
# 1. Docs Reader (Public?)
|
||||
# Assuming /docs is public in my implementation (didn't add auth dependency to list_docs)
|
||||
print("📚 Checking Docs Reader (/docs)...")
|
||||
res = s.get(f"{BASE_URL}/docs")
|
||||
if res.status_code == 200 and "Dokumentation" in res.text:
|
||||
print("✅ Docs Index accessible")
|
||||
if "README.md" in res.text:
|
||||
print("✅ README.md listed")
|
||||
else:
|
||||
print(f"❌ Docs Index failed: {res.status_code}")
|
||||
|
||||
print("📖 Checking README Render (/docs/README.md)...")
|
||||
res = s.get(f"{BASE_URL}/docs/README.md")
|
||||
if res.status_code == 200 and "Crumbforest" in res.text: # Assuming headline
|
||||
print("✅ README rendered successfully")
|
||||
else:
|
||||
print(f"❌ README render failed: {res.status_code}")
|
||||
|
||||
# 2. Login (for Admin/Pulse)
|
||||
print("🔑 Logging in as Admin...")
|
||||
s.post(f"{BASE_URL}/de/login", data={"email": "admin@crumb.local", "password": "admin123"})
|
||||
|
||||
# 3. Check RC2 Version
|
||||
# Usually in footer or settings? Or I check config editor response
|
||||
print("⚙️ Checking Admin Config Editor & Version...")
|
||||
res = s.get(f"{BASE_URL}/admin/config")
|
||||
if res.status_code == 200:
|
||||
print("✅ Config Editor accessible")
|
||||
if "1.0.0-rc2" in res.text:
|
||||
print("✅ Version is 1.0.0-rc2")
|
||||
else:
|
||||
print("❌ Version mismatch (Expected 1.0.0-rc2)")
|
||||
print(f"DEBUG Response content (truncated): {res.text[:500]}")
|
||||
else:
|
||||
print(f"❌ Config Editor access failed: {res.status_code}")
|
||||
|
||||
# 4. Check Pulse
|
||||
print("💓 Checking Pulse...")
|
||||
res = s.get(f"{BASE_URL}/crumbforest/pulse")
|
||||
if res.status_code == 200 and "Themenwolke" in res.text:
|
||||
print("✅ Pulse working")
|
||||
else:
|
||||
print("❌ Pulse failed")
|
||||
|
||||
print("✨ RC2 Verified.")
|
||||
|
||||
if __name__ == "__main__":
|
||||
test_rc2()
|
||||
Reference in New Issue
Block a user