Skip to content

Commit 6a439df

Browse files
committed
Change host for neo4j query runner in CI
1 parent 799af43 commit 6a439df

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

graphdatascience/tests/integrationV2/procedure_surface/cypher/conftest.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,12 @@ def gds_plugin_container() -> Generator[Neo4jContainer, None, None]:
3131

3232
@pytest.fixture(scope="package")
3333
def query_runner(gds_plugin_container: DockerContainer) -> Generator[QueryRunner, None, None]:
34+
host = "localhost"
35+
if os.environ.get("BUILD_NUMBER") is not None:
36+
host = "host.docker.internal"
37+
3438
query_runner = Neo4jQueryRunner.create_for_db(
35-
f"bolt://localhost:{gds_plugin_container.get_exposed_port(7687)}",
39+
f"bolt://{host}:{gds_plugin_container.get_exposed_port(7687)}",
3640
("neo4j", "password"),
3741
)
3842
yield query_runner

tox.ini

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,5 +111,6 @@ commands =
111111
[testenv:session-v2-endpoints]
112112
passenv =
113113
GDS_SESSION_IMAGE
114+
BUILD_NUMBER
114115
commands =
115116
pytest graphdatascience/tests/integrationV2/procedure_surface/cypher -vv --include-integration-v2 -k "test_kcore_stats_with_parameters"

0 commit comments

Comments
 (0)