recipe-maintainer: public snapshot (secrets + deployment plans removed, single commit)
Sanitized single-commit public mirror of recipe-maintainer. - Removed test-ssh/.testenv (live creds); added test-ssh/.testenv.example placeholders. - Removed plans/ and planned-updates/ (deployment-planning docs) so no client/ deployment domains appear in the public repo. - All other secret stores were already gitignored. - docs.coopcloud.tech retained as a submodule (public upstream).
This commit is contained in:
+56
@@ -0,0 +1,56 @@
|
||||
#!/usr/bin/env python3
|
||||
"""WOPI on startup test — verifies celery worker runs WOPI config on startup."""
|
||||
import argparse
|
||||
import os
|
||||
import sys
|
||||
|
||||
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..', '..', '..'))
|
||||
from utils.tests.helpers import run, resolve_server
|
||||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser()
|
||||
parser.add_argument('--domain', default=os.environ.get('TEST_DOMAIN'))
|
||||
args = parser.parse_args()
|
||||
|
||||
server = resolve_server()
|
||||
|
||||
print("Testing WOPI configuration on startup")
|
||||
print()
|
||||
|
||||
# Check celery worker logs for the entrypoint WOPI trigger message
|
||||
print("Step 1: Checking celery worker logs for WOPI startup trigger ...")
|
||||
|
||||
result = run(
|
||||
f'ssh {server} "docker ps -f name=lasuite-drive --format \'{{{{.Names}}}}\' | grep -E \'celery\\.\' | grep -v beat"',
|
||||
check=False, timeout=30,
|
||||
)
|
||||
celery_name = result.stdout.strip().split('\n')[0].strip()
|
||||
|
||||
result = run(
|
||||
f'ssh {server} "docker logs {celery_name} 2>&1 | head -5"',
|
||||
check=False, timeout=30,
|
||||
)
|
||||
celery_logs = result.stdout
|
||||
|
||||
if "running WOPI configuration on startup" in celery_logs:
|
||||
print(" PASS: Celery worker ran WOPI configuration on startup")
|
||||
else:
|
||||
print(" FAIL: WOPI startup trigger not found in celery worker logs")
|
||||
print(f" Logs: {celery_logs}")
|
||||
sys.exit(1)
|
||||
|
||||
# Verify it didn't fail
|
||||
if "WOPI configuration failed" in celery_logs:
|
||||
print(" FAIL: WOPI configuration failed on startup")
|
||||
print(f" Logs: {celery_logs}")
|
||||
sys.exit(1)
|
||||
else:
|
||||
print(" PASS: WOPI configuration completed without errors")
|
||||
|
||||
print()
|
||||
print("PASS: WOPI on startup test passed")
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
Reference in New Issue
Block a user