Skip to content

Commit

Permalink
fix pytest
Browse files Browse the repository at this point in the history
  • Loading branch information
jasinliu committed Sep 19, 2023
1 parent c9e7763 commit 23cf5f0
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions test/integration/test_import_gar.py
Original file line number Diff line number Diff line change
@@ -7,8 +7,22 @@
class TestImportGar:
config_path = Path.cwd().parent.parent / "test/resource/data/ldbc_parquet/ldbc_sample.graph.yml"

IMPORTOPT = {"cmd":f"./lgraph_import -c {config_path} --gar true --overwrite true --d gar_db"}
IMPORTOPT = {"cmd":f"./lgraph_import -c {config_path} --gar true --overwrite true --d gar_db",
"cleanup_dir":["./gar_db"]}

@pytest.mark.parametrize("importer", [IMPORTOPT], indirect=True)
def test_cpp_client(self, importer):
pass
SERVEROPT = {"cmd":"./lgraph_server -c lgraph_standalone.json --directory ./gar_db --port 27070 --rpc_port 27071 --log_dir '' ",
"cleanup_dir":["./gar_db"]}

CLIENTOPT = {"host":"http://127.0.0.1:27071/LGraphHttpService/Query/", "user":"admin", "password":"73@TuGraph"}

@pytest.mark.parametrize("importor", [IMPORTOPT], indirect=True)
@pytest.mark.parametrize("server", [SERVEROPT], indirect=True)
@pytest.mark.parametrize("rest_client", [CLIENTOPT], indirect=True)
def test_import_gar(self, importor, server, rest_client):
label_res = rest_client.call_cypher("default", "CALL db.vertexLabels()")
log.info(label_res)
assert len(label_res) == 1

vertex_res = rest_client.call_cypher("default", "MATCH (p:person) RETURN count(p)")
log.info(vertex_res)
assert vertex_res[0]['count(p)'] == 903

0 comments on commit 23cf5f0

Please sign in to comment.