1212def is_local_server_running ():
1313 """Check if local TerminusDB server is running at http://127.0.0.1:6363"""
1414 try :
15- requests .get ("http://127.0.0.1:6363/api/" , timeout = 2 )
16- # Any HTTP response means server is running (200, 302, 401, 404, 500, etc.)
17- # We only care that we got a response, not what the response is
15+ requests .get ("http://127.0.0.1:6363/api/ok" , timeout = 2 )
16+ # Any HTTP response means server is running
1817 return True
1918 except (requests .exceptions .ConnectionError , requests .exceptions .Timeout ):
2019 return False
2120
2221
2322def is_docker_server_running ():
24- """Check if Docker TerminusDB server is already running at http://127.0.0.1:6366 """
23+ """Check if Docker TerminusDB server is already running at http://127.0.0.1:6363 """
2524 try :
26- requests .get ("http://127.0.0.1:6366 /api/" , timeout = 2 )
25+ requests .get ("http://127.0.0.1:6363 /api/ok " , timeout = 2 )
2726 # Any HTTP response means server is running
2827 return True
2928 except (requests .exceptions .ConnectionError , requests .exceptions .Timeout ):
@@ -143,33 +142,17 @@ def docker_url_jwt(pytestconfig):
143142def docker_url (pytestconfig ):
144143 """
145144 Provides a TerminusDB server URL for integration tests.
146- Prefers local test server if running, otherwise starts Docker container.
147-
148- NOTE: This fixture returns just the URL. Tests expect AUTOLOGIN mode (no authentication).
149- If using local server with authentication, use TERMINUSDB_AUTOLOGIN=true when starting it.
145+ Uses port 6363 with admin:root authentication by default.
146+ Prefers an already-running server, otherwise starts a Docker container.
150147 """
151- # Check if local test server is already running (port 6363)
148+ # Check if a server is already running (port 6363)
152149 if is_local_server_running ():
153- print (
154- "\n ✓ Using existing local TerminusDB test server at http://127.0.0.1:6363"
155- )
156- print (
157- "⚠️ WARNING: Local server should be started with TERMINUSDB_AUTOLOGIN=true"
158- )
159- print (
160- " Or use: TERMINUSDB_SERVER_AUTOLOGIN=true ./tests/terminusdb-test-server.sh restart"
161- )
150+ print ("\n ✓ Using existing TerminusDB server at http://127.0.0.1:6363" )
162151 yield "http://127.0.0.1:6363"
163152 return # Don't clean up - server was already running
164153
165- # Check if Docker container is already running (port 6366)
166- if is_docker_server_running ():
167- print ("\n ✓ Using existing Docker TerminusDB server at http://127.0.0.1:6366" )
168- yield "http://127.0.0.1:6366"
169- return # Don't clean up - server was already running
170-
171154 # No server found, start Docker container
172- print ("\n ⚠ No server found, starting Docker container with AUTOLOGIN ..." )
155+ print ("\n ⚠ No server found, starting Docker container..." )
173156 pytestconfig .getoption ("docker_compose" )
174157 output = subprocess .run (
175158 [
@@ -185,7 +168,7 @@ def docker_url(pytestconfig):
185168 if output .returncode != 0 :
186169 raise RuntimeError (output .stderr )
187170
188- test_url = "http://127.0.0.1:6366 "
171+ test_url = "http://127.0.0.1:6363 "
189172 is_server_started = False
190173
191174 seconds_waited = 0
0 commit comments