Skip to content

Commit

Permalink
Get server version from correct bolt address
Browse files Browse the repository at this point in the history
  • Loading branch information
soerenreichardt committed Oct 8, 2024
1 parent fcb53de commit 539cac9
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions graphdatascience/tests/integration/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,21 +182,20 @@ def pytest_collection_modifyitems(config: Any, items: Any) -> None:
for item in items:
if "cloud_architecture" not in item.keywords:
item.add_marker(skip_on_prem)
(uri, auth) = (GDS_SESSION_URI, GDS_SESSION_AUTH)
else:
skip_cloud_architecture = pytest.mark.skip(reason="need --include-cloud-architecture option to run")
for item in items:
if "cloud_architecture" in item.keywords:
item.add_marker(skip_cloud_architecture)

gds = GraphDataScience(URI, auth=AUTH)

try:
server_version = gds._server_version
except Exception as e:
print("Could not derive GDS library server version")
raise e
finally:
gds.close()
(uri, auth) = (URI, AUTH)

with GraphDataScience(uri, auth=auth) as gds:
try:
server_version = gds._server_version()
except Exception as e:
print("Could not derive GDS library server version")
raise e

skip_incompatible_versions = pytest.mark.skip(reason=f"incompatible with GDS server version {server_version}")

Expand Down

0 comments on commit 539cac9

Please sign in to comment.