Skip to content

Commit 4f58c17

Browse files
update
1 parent 62ef725 commit 4f58c17

3 files changed

Lines changed: 53 additions & 0 deletions

File tree

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import pytest
2+
from selenium import webdriver
3+
from selenium.webdriver.chrome.options import Options
4+
5+
def test_chrome_starts():
6+
options = Options()
7+
options.add_argument("--headless")
8+
options.add_argument("--no-sandbox")
9+
driver = webdriver.Chrome(options=options)
10+
driver.get("https://www.example.com/")
11+
assert "Example Domain" in driver.title
12+
driver.quit()
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import requests
2+
import pytest
3+
4+
SERVICES = [
5+
("llm-orchestrator", "http://llm-orchestrator:5000/health"),
6+
("browser-service", "http://browser-service:3000/health"),
7+
("web-interface", "http://web-interface:8080/"),
8+
("novnc", "http://novnc:6080/"),
9+
("video-chat", "http://video-chat:443/"),
10+
("web-terminal", "http://web-terminal:8081/"),
11+
]
12+
13+
@pytest.mark.parametrize("service_name, url", SERVICES)
14+
def test_service_health(service_name, url):
15+
try:
16+
resp = requests.get(url, timeout=10, verify=False)
17+
assert resp.status_code in (200, 401, 403)
18+
except Exception as e:
19+
pytest.fail(f"{service_name} not healthy: {e}")
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
import socket
2+
import pytest
3+
4+
PORTS = [
5+
("llm-orchestrator", "llm-orchestrator", 5000),
6+
("browser-service", "browser-service", 3000),
7+
("web-interface", "web-interface", 8080),
8+
("novnc", "novnc", 6080),
9+
("video-chat", "video-chat", 443),
10+
("web-terminal", "web-terminal", 8081),
11+
]
12+
13+
@pytest.mark.parametrize("service_name, host, port", PORTS)
14+
def test_port_open(service_name, host, port):
15+
s = socket.socket()
16+
try:
17+
s.settimeout(4)
18+
s.connect((host, port))
19+
except Exception as e:
20+
pytest.fail(f"{service_name} port {port} not open: {e}")
21+
finally:
22+
s.close()

0 commit comments

Comments
 (0)