Skip to content

wip

wip #28

GitHub Actions / nitunit-services Results failed Jun 25, 2024 in 0s

25 errors, 16 pass in 4s

41 tests   16 ✅  4s ⏱️
 7 suites   0 💤
 1 files     0 ❌  25 🔥

Results for commit 6cd0962.

Annotations

Check failure on line 0 in nitunit.mongodb::mongodb.<module>

See this annotation in the file changed.

@github-actions github-actions / nitunit-services Results

<module> (nitunit.mongodb::mongodb.<module>) with error

nitunit.xml [took 0s]
Raw output
Runtime error in nitunit.out/mongodb-0.nit with argument 1
Runtime assert: <MongoCollection:#7f0522efbd40>.insert(<JsonObject#0 {"foo":10, "bar":"bar", "baz":<JsonArray#1>}>)
Runtime error: Assert failed (nitunit.out/mongodb-0.nit:23)
-------------------------------------------------
--   Stack Trace   ------------------------------
-------------------------------------------------
` fatal_exit
` mongodb-0::mongodb-0$core::Sys$run_1 (nitunit.out/mongodb-0.nit:5)
` mongodb-0::mongodb-0$core::Sys$main (nitunit.out/mongodb-0.nit:210)
` main
` __libc_init_first
` __libc_start_main
` _start
-------------------------------------------------
# Opens the connexion with the Mongo server.
var client = new MongoClient("mongodb://mongo:27017/")

# Select the database.
var db_suffix = "NIT_TESTING_ID".environ
var db_name = "test_{db_suffix}"
var db = client.database(db_name)

# Retrieve a collection.
var col = db.collection("test")

# Insert a document in the collection.
var doc = new JsonObject
doc["foo"] = 10
doc["bar"] = "bar"
doc["baz"] = new JsonArray
assert col.insert(doc)

# Retrieve a document from the collection.
var query = new JsonObject
query["foo"] = 10
var res = col.find(query)
assert res["bar"] == "bar"

Check failure on line 0 in nitunit.mongodb.MongoClient

See this annotation in the file changed.

@github-actions github-actions / nitunit-services Results

server_status (nitunit.mongodb.MongoClient) with error

nitunit.xml [took 0s]
Raw output
Runtime error in nitunit.out/mongodb-0.nit with argument 3
Runtime error: Receiver is null (nitunit.out/mongodb-0.nit:40)
-------------------------------------------------
--   Stack Trace   ------------------------------
-------------------------------------------------
` fatal_exit
` mongodb-0::mongodb-0$core::Sys$run_3 (nitunit.out/mongodb-0.nit:37)
` mongodb-0::mongodb-0$core::Sys$main (nitunit.out/mongodb-0.nit:210)
` main
` __libc_init_first
` __libc_start_main
` _start
-------------------------------------------------
var client = new MongoClient("mongodb://mongo:27017/")
assert client.server_status["process"] == "mongod"

Check failure on line 0 in nitunit.mongodb.MongoClient

See this annotation in the file changed.

@github-actions github-actions / nitunit-services Results

database_names (nitunit.mongodb.MongoClient) with error

nitunit.xml [took 0s]
Raw output
Runtime error in nitunit.out/mongodb-0.nit with argument 4
Runtime assert: [].has(test_6953)
Runtime error: Assert failed (nitunit.out/mongodb-0.nit:49)
-------------------------------------------------
--   Stack Trace   ------------------------------
-------------------------------------------------
` fatal_exit
` mongodb-0::mongodb-0$core::Sys$run_4 (nitunit.out/mongodb-0.nit:42)
` mongodb-0::mongodb-0$core::Sys$main (nitunit.out/mongodb-0.nit:210)
` main
` __libc_init_first
` __libc_start_main
` _start
-------------------------------------------------
var client = new MongoClient("mongodb://mongo:27017/")
var db_suffix = "NIT_TESTING_ID".environ
var db_name = "test_{db_suffix}"
var db = client.database(db_name)
db.collection("test").insert(new JsonObject)
assert client.database_names.has(db_name)

Check failure on line 0 in nitunit.mongodb.MongoDb

See this annotation in the file changed.

@github-actions github-actions / nitunit-services Results

collection_names (nitunit.mongodb.MongoDb) with error

nitunit.xml [took 0s]
Raw output
Runtime error in nitunit.out/mongodb-0.nit with argument 6
Runtime assert: [].has(test)
Runtime error: Assert failed (nitunit.out/mongodb-0.nit:66)
-------------------------------------------------
--   Stack Trace   ------------------------------
-------------------------------------------------
` fatal_exit
` mongodb-0::mongodb-0$core::Sys$run_6 (nitunit.out/mongodb-0.nit:59)
` mongodb-0::mongodb-0$core::Sys$main (nitunit.out/mongodb-0.nit:210)
` main
` __libc_init_first
` __libc_start_main
` _start
-------------------------------------------------
var client = new MongoClient("mongodb://mongo:27017/")
var db_suffix = "NIT_TESTING_ID".environ
var db_name = "test_{db_suffix}"
var db = client.database(db_name)
db.collection("test").insert(new JsonObject)
assert db.collection_names.has("test")

Check failure on line 0 in nitunit.mongodb.MongoCollection

See this annotation in the file changed.

@github-actions github-actions / nitunit-services Results

insert (nitunit.mongodb.MongoCollection) with error

nitunit.xml [took 0s]
Raw output
Runtime error in nitunit.out/mongodb-0.nit with argument 9
Runtime assert: <MongoCollection:#7fcd92e74d40>.insert(<JsonObject#0 {"foo":10, "bar":"bar", "baz":<JsonArray#1>}>)
Runtime error: Assert failed (nitunit.out/mongodb-0.nit:96)
-------------------------------------------------
--   Stack Trace   ------------------------------
-------------------------------------------------
` fatal_exit
` mongodb-0::mongodb-0$core::Sys$run_9 (nitunit.out/mongodb-0.nit:85)
` mongodb-0::mongodb-0$core::Sys$main (nitunit.out/mongodb-0.nit:210)
` main
` __libc_init_first
` __libc_start_main
` _start
-------------------------------------------------
var client = new MongoClient("mongodb://mongo:27017/")
var db_suffix = "NIT_TESTING_ID".environ
var db_name = "test_{db_suffix}"
var db = client.database(db_name)
var col = db.collection("test")
var doc = new JsonObject
doc["foo"] = 10
doc["bar"] = "bar"
doc["baz"] = new JsonArray
assert col.insert(doc)
assert doc.has_key("_id")

Check failure on line 0 in nitunit.mongodb.MongoCollection

See this annotation in the file changed.

@github-actions github-actions / nitunit-services Results

save (nitunit.mongodb.MongoCollection) with error

nitunit.xml [took 0s]
Raw output
Runtime error in nitunit.out/mongodb-0.nit with argument 10
Runtime assert: <MongoCollection:#7f033bebed40>.save(<JsonObject#0 {"foo":10, "bar":"bar", "baz":<JsonArray#1>}>)
Runtime error: Assert failed (nitunit.out/mongodb-0.nit:112)
-------------------------------------------------
--   Stack Trace   ------------------------------
-------------------------------------------------
` fatal_exit
` mongodb-0::mongodb-0$core::Sys$run_10 (nitunit.out/mongodb-0.nit:99)
` mongodb-0::mongodb-0$core::Sys$main (nitunit.out/mongodb-0.nit:210)
` main
` __libc_init_first
` __libc_start_main
` _start
-------------------------------------------------
var client = new MongoClient("mongodb://mongo:27017/")
var db_suffix = "NIT_TESTING_ID".environ
var db_name = "test_{db_suffix}"
var db = client.database(db_name)
var col = db.collection("test")

var doc = new JsonObject
doc["foo"] = 10
doc["bar"] = "bar"
doc["baz"] = new JsonArray

assert col.save(doc) # will be inserted
assert doc.has_key("_id")

var id = doc["_id"]
assert col.save(doc) # will be updated
assert doc["_id"] == id

Check failure on line 0 in nitunit.mongodb.MongoCollection

See this annotation in the file changed.

@github-actions github-actions / nitunit-services Results

remove (nitunit.mongodb.MongoCollection) with error

nitunit.xml [took 0s]
Raw output
Runtime error in nitunit.out/mongodb-0.nit with argument 11
Runtime assert: <MongoCollection:#7f88449d5d40>.remove(<JsonObject#0 {"foo":10}>)
Runtime error: Assert failed (nitunit.out/mongodb-0.nit:128)
-------------------------------------------------
--   Stack Trace   ------------------------------
-------------------------------------------------
` fatal_exit
` mongodb-0::mongodb-0$core::Sys$run_11 (nitunit.out/mongodb-0.nit:119)
` mongodb-0::mongodb-0$core::Sys$main (nitunit.out/mongodb-0.nit:210)
` main
` __libc_init_first
` __libc_start_main
` _start
-------------------------------------------------
var client = new MongoClient("mongodb://mongo:27017/")
var db_suffix = "NIT_TESTING_ID".environ
var db_name = "test_{db_suffix}"
var db = client.database(db_name)
var col = db.collection("test")
var sel = new JsonObject
sel["foo"] = 10
assert col.remove(sel)

Check failure on line 0 in nitunit.mongodb.MongoCollection

See this annotation in the file changed.

@github-actions github-actions / nitunit-services Results

update (nitunit.mongodb.MongoCollection) with error

nitunit.xml [took 0s]
Raw output
Runtime error in nitunit.out/mongodb-0.nit with argument 12
Runtime assert: <MongoCollection:#7fb50771bd40>.update(<JsonObject#0 {"foo":10}>, <JsonObject#0 {"bar":"BAR"}>)
Runtime error: Assert failed (nitunit.out/mongodb-0.nit:141)
-------------------------------------------------
--   Stack Trace   ------------------------------
-------------------------------------------------
` fatal_exit
` mongodb-0::mongodb-0$core::Sys$run_12 (nitunit.out/mongodb-0.nit:130)
` mongodb-0::mongodb-0$core::Sys$main (nitunit.out/mongodb-0.nit:210)
` main
` __libc_init_first
` __libc_start_main
` _start
-------------------------------------------------
var client = new MongoClient("mongodb://mongo:27017/")
var db_suffix = "NIT_TESTING_ID".environ
var db_name = "test_{db_suffix}"
var db = client.database(db_name)
var col = db.collection("test")
var sel = new JsonObject
sel["foo"] = 10
var upd = new JsonObject
upd["bar"] = "BAR"
assert col.update(sel, upd)

Check failure on line 0 in nitunit.mongodb.MongoCollection

See this annotation in the file changed.

@github-actions github-actions / nitunit-services Results

count (nitunit.mongodb.MongoCollection) with error

nitunit.xml [took 0s]
Raw output
Runtime error in nitunit.out/mongodb-0.nit with argument 13
Runtime assert: -1 > 0
Runtime error: Assert failed (nitunit.out/mongodb-0.nit:152)
-------------------------------------------------
--   Stack Trace   ------------------------------
-------------------------------------------------
` fatal_exit
` mongodb-0::mongodb-0$core::Sys$run_13 (nitunit.out/mongodb-0.nit:143)
` main
` __libc_init_first
` __libc_start_main
` _start
-------------------------------------------------
var client = new MongoClient("mongodb://mongo:27017/")
var db_suffix = "NIT_TESTING_ID".environ
var db_name = "test_{db_suffix}"
var db = client.database(db_name)
var col = db.collection("test")
var query = new JsonObject
query["foo"] = 10
assert col.count(query) > 0

Check failure on line 0 in nitunit.mongodb.MongoCollection

See this annotation in the file changed.

@github-actions github-actions / nitunit-services Results

find (nitunit.mongodb.MongoCollection) with error

nitunit.xml [took 0s]
Raw output
Runtime error in nitunit.out/mongodb-0.nit with argument 14
Runtime error: Receiver is null (nitunit.out/mongodb-0.nit:164)
-------------------------------------------------
--   Stack Trace   ------------------------------
-------------------------------------------------
` fatal_exit
` mongodb-0::mongodb-0$core::Sys$run_14 (nitunit.out/mongodb-0.nit:154)
` main
` __libc_init_first
` __libc_start_main
` _start
-------------------------------------------------
var client = new MongoClient("mongodb://mongo:27017/")
var db_suffix = "NIT_TESTING_ID".environ
var db_name = "test_{db_suffix}"
var db = client.database(db_name)
var col = db.collection("test")
var query = new JsonObject
query["foo"] = 10
var doc = col.find(query)
assert doc["foo"] == 10

Check failure on line 0 in nitunit.mongodb.MongoCollection

See this annotation in the file changed.

@github-actions github-actions / nitunit-services Results

find_all (nitunit.mongodb.MongoCollection) with error

nitunit.xml [took 0s]
Raw output
Runtime error in nitunit.out/mongodb-0.nit with argument 15
Runtime assert: 0 > 0
Runtime error: Assert failed (nitunit.out/mongodb-0.nit:175)
-------------------------------------------------
--   Stack Trace   ------------------------------
-------------------------------------------------
` fatal_exit
` mongodb-0::mongodb-0$core::Sys$run_15 (nitunit.out/mongodb-0.nit:166)
` main
` __libc_init_first
` __libc_start_main
` _start
-------------------------------------------------
var client = new MongoClient("mongodb://mongo:27017/")
var db_suffix = "NIT_TESTING_ID".environ
var db_name = "test_{db_suffix}"
var db = client.database(db_name)
var col = db.collection("test")
var query = new JsonObject
query["foo"] = 10
assert col.find_all(query).length > 0

Check failure on line 0 in nitunit.mongodb.MongoCollection

See this annotation in the file changed.

@github-actions github-actions / nitunit-services Results

aggregate (nitunit.mongodb.MongoCollection) with error

nitunit.xml [took 2s]
Raw output
Runtime error in nitunit.out/mongodb-0.nit with argument 16
Runtime error: Assert 'index' failed (./lib/core/collection/array.nit:323)
-------------------------------------------------
--   Stack Trace   ------------------------------
-------------------------------------------------
` fatal_exit
` core$Array$SequenceRead::[] (./lib/core/collection/array.nit:321)
` mongodb-0::mongodb-0$core::Sys$run_16 (nitunit.out/mongodb-0.nit:177)
` main
` __libc_init_first
` __libc_start_main
` _start
-------------------------------------------------
var client = new MongoClient("mongodb://mongo:27017/")
var db_suffix = "NIT_TESTING_ID".environ
var db_name = "test_{db_suffix}"
var db = client.database(db_name)
var col = db.collection("test_aggregate")

col.drop

col.insert("""{ "cust_id": "A123", "amount": 500, "status": "A"}""".parse_json.as(JsonObject))
col.insert("""{ "cust_id": "A123", "amount": 250, "status": "A"}""".parse_json.as(JsonObject))
col.insert("""{ "cust_id": "B212", "amount": 200, "status": "A"}""".parse_json.as(JsonObject))
col.insert("""{ "cust_id": "A123", "amount": 300, "status": "D"}""".parse_json.as(JsonObject))

var res = col.aggregate("""[
	{ "$match": { "status": "A" } },
	{ "$group": { "_id": "$cust_id", "total": { "$sum": "$amount" } } },
      { "$sort" : { "_id": 1 } }
]""".parse_json.as(JsonArray))

assert res[0].to_json == """{"_id":"A123","total":750}"""
assert res[1].to_json == """{"_id":"B212","total":200}"""

Check failure on line 0 in nitunit.mongodb.MongoCollection

See this annotation in the file changed.

@github-actions github-actions / nitunit-services Results

stats (nitunit.mongodb.MongoCollection) with error

nitunit.xml [took 0s]
Raw output
Runtime error in nitunit.out/mongodb-0.nit with argument 17
Runtime error: Receiver is null (nitunit.out/mongodb-0.nit:208)
-------------------------------------------------
--   Stack Trace   ------------------------------
-------------------------------------------------
` fatal_exit
` mongodb-0::mongodb-0$core::Sys$run_17 (nitunit.out/mongodb-0.nit:201)
` main
` __libc_init_first
` __libc_start_main
` _start
-------------------------------------------------
var client = new MongoClient("mongodb://mongo:27017/")
var db_suffix = "NIT_TESTING_ID".environ
var db_name = "test_{db_suffix}"
var db = client.database(db_name)
var col = db.collection("test")
assert col.stats["ns"] == "{db_name}.test"

Check failure on line 0 in nitunit.neo4j::neo4j.<module>

See this annotation in the file changed.

@github-actions github-actions / nitunit-services Results

<module> (nitunit.neo4j::neo4j.<module>) with error

nitunit.xml [took 0s]
Raw output
Runtime error in nitunit.out/neo4j-0.nit with argument 1
Neo4jClientError: cannot connect to server at <http://neo4j:7474>.
Runtime assert: [CurlError] Couldn't resolve host name (6) isa JsonObject
Runtime error: Assert failed (lib/neo4j/neo4j.nit:81)
-------------------------------------------------
--   Stack Trace   ------------------------------
-------------------------------------------------
` fatal_exit
` neo4j$Neo4jClient$defaultinit (lib/neo4j/neo4j.nit:78)
` neo4j-0::neo4j-0$core::Sys$run_1 (nitunit.out/neo4j-0.nit:5)
` neo4j-0::neo4j-0$core::Sys$main (nitunit.out/neo4j-0.nit:181)
` main
` __libc_init_first
` __libc_start_main
` _start
-------------------------------------------------
# Create new Neo4j client
var client = new Neo4jClient("http://neo4j:7474")
assert client.is_ok
# Create a disconnected node
var andres = new NeoNode
andres["name"] = "Andres"
# Connect the node to Neo4j
client.save_node(andres)
assert andres.is_linked

# Create a second node
var kate = new NeoNode
kate["name"] = "Kate"
client.save_node(kate)
assert kate.is_linked
# Create a relationship
var loves = new NeoEdge(andres, "LOVES", kate)
client.save_edge(loves)
assert loves.is_linked
# Get a node from DB and explore edges
var url = andres.url.to_s
var from = client.load_node(url)
assert from["name"].to_s == "Andres"
var to = from.out_nodes("LOVES").first		# follow the first LOVES relationship
assert to["name"].to_s == "Kate"

Check failure on line 0 in nitunit.neo4j.Neo4jClient

See this annotation in the file changed.

@github-actions github-actions / nitunit-services Results

<class> (nitunit.neo4j.Neo4jClient) with error

nitunit.xml [took 0s]
Raw output
Runtime error in nitunit.out/neo4j-0.nit with argument 2
Neo4jClientError: cannot connect to server at <http://neo4j:7474>.
Runtime assert: [CurlError] Couldn't resolve host name (6) isa JsonObject
Runtime error: Assert failed (lib/neo4j/neo4j.nit:81)
-------------------------------------------------
--   Stack Trace   ------------------------------
-------------------------------------------------
` fatal_exit
` neo4j$Neo4jClient$defaultinit (lib/neo4j/neo4j.nit:78)
` neo4j-0::neo4j-0$core::Sys$run_2 (nitunit.out/neo4j-0.nit:33)
` neo4j-0::neo4j-0$core::Sys$main (nitunit.out/neo4j-0.nit:181)
` main
` __libc_init_first
` __libc_start_main
` _start
-------------------------------------------------
var client = new Neo4jClient("http://neo4j:7474")
assert client.is_ok

Check failure on line 0 in nitunit.neo4j.Neo4jClient

See this annotation in the file changed.

@github-actions github-actions / nitunit-services Results

save_node (nitunit.neo4j.Neo4jClient) with error

nitunit.xml [took 0s]
Raw output
Runtime error in nitunit.out/neo4j-0.nit with argument 3
Neo4jClientError: cannot connect to server at <http://neo4j:7474>.
Runtime assert: [CurlError] Couldn't resolve host name (6) isa JsonObject
Runtime error: Assert failed (lib/neo4j/neo4j.nit:81)
-------------------------------------------------
--   Stack Trace   ------------------------------
-------------------------------------------------
` fatal_exit
` neo4j$Neo4jClient$defaultinit (lib/neo4j/neo4j.nit:78)
` neo4j-0::neo4j-0$core::Sys$run_3 (nitunit.out/neo4j-0.nit:38)
` neo4j-0::neo4j-0$core::Sys$main (nitunit.out/neo4j-0.nit:181)
` main
` __libc_init_first
` __libc_start_main
` _start
-------------------------------------------------
var client = new Neo4jClient("http://neo4j:7474")

# Create a node
var andres = new NeoNode
andres["name"] = "Andres"
client.save_node(andres)
assert andres.is_linked
var oldurl = andres.url
client.save_node(andres) # do nothing
assert andres.url == oldurl

Check failure on line 0 in nitunit.neo4j.Neo4jClient

See this annotation in the file changed.

@github-actions github-actions / nitunit-services Results

save_edge (nitunit.neo4j.Neo4jClient) with error

nitunit.xml [took 0s]
Raw output
Runtime error in nitunit.out/neo4j-0.nit with argument 4
Neo4jClientError: cannot connect to server at <http://neo4j:7474>.
Runtime assert: [CurlError] Couldn't resolve host name (6) isa JsonObject
Runtime error: Assert failed (lib/neo4j/neo4j.nit:81)
-------------------------------------------------
--   Stack Trace   ------------------------------
-------------------------------------------------
` fatal_exit
` neo4j$Neo4jClient$defaultinit (lib/neo4j/neo4j.nit:78)
` neo4j-0::neo4j-0$core::Sys$run_4 (nitunit.out/neo4j-0.nit:51)
` neo4j-0::neo4j-0$core::Sys$main (nitunit.out/neo4j-0.nit:181)
` main
` __libc_init_first
` __libc_start_main
` _start
-------------------------------------------------
var client = new Neo4jClient("http://neo4j:7474")

var andres = new NeoNode
var kate = new NeoNode
var edge = new NeoEdge(andres, "LOVES", kate)
client.save_edge(edge)
assert andres.is_linked
assert kate.is_linked
assert edge.is_linked

Check failure on line 0 in nitunit.neo4j.Neo4jClient

See this annotation in the file changed.

@github-actions github-actions / nitunit-services Results

nodes_with_label (nitunit.neo4j.Neo4jClient) with error

nitunit.xml [took 0s]
Raw output
Runtime error in nitunit.out/neo4j-0.nit with argument 5
Neo4jClientError: cannot connect to server at <http://neo4j:7474>.
Runtime assert: [CurlError] Couldn't resolve host name (6) isa JsonObject
Runtime error: Assert failed (lib/neo4j/neo4j.nit:81)
-------------------------------------------------
--   Stack Trace   ------------------------------
-------------------------------------------------
` fatal_exit
` neo4j$Neo4jClient$defaultinit (lib/neo4j/neo4j.nit:78)
` neo4j-0::neo4j-0$core::Sys$run_5 (nitunit.out/neo4j-0.nit:63)
` neo4j-0::neo4j-0$core::Sys$main (nitunit.out/neo4j-0.nit:181)
` main
` __libc_init_first
` __libc_start_main
` _start
-------------------------------------------------
var client = new Neo4jClient("http://neo4j:7474")

var andres = new NeoNode
andres.labels.add_all(["Human", "Male"])
client.save_node(andres)
var kate = new NeoNode
kate.labels.add_all(["Human", "Female"])
client.save_node(kate)

var nodes = client.nodes_with_label("Human")
assert nodes.has(andres)
assert nodes.has(kate)

Check failure on line 0 in nitunit.neo4j.Neo4jClient

See this annotation in the file changed.

@github-actions github-actions / nitunit-services Results

nodes_with_labels (nitunit.neo4j.Neo4jClient) with error

nitunit.xml [took 0s]
Raw output
Runtime error in nitunit.out/neo4j-0.nit with argument 6
Neo4jClientError: cannot connect to server at <http://neo4j:7474>.
Runtime assert: [CurlError] Couldn't resolve host name (6) isa JsonObject
Runtime error: Assert failed (lib/neo4j/neo4j.nit:81)
-------------------------------------------------
--   Stack Trace   ------------------------------
-------------------------------------------------
` fatal_exit
` neo4j$Neo4jClient$defaultinit (lib/neo4j/neo4j.nit:78)
` neo4j-0::neo4j-0$core::Sys$run_6 (nitunit.out/neo4j-0.nit:78)
` neo4j-0::neo4j-0$core::Sys$main (nitunit.out/neo4j-0.nit:181)
` main
` __libc_init_first
` __libc_start_main
` _start
-------------------------------------------------
var client = new Neo4jClient("http://neo4j:7474")

var andres = new NeoNode
andres.labels.add_all(["Human", "Male"])
client.save_node(andres)
var kate = new NeoNode
kate.labels.add_all(["Human", "Female"])
client.save_node(kate)

var nodes = client.nodes_with_labels(["Human", "Male"])
assert nodes.has(andres)
assert not nodes.has(kate)

Check failure on line 0 in nitunit.neo4j.CypherQuery

See this annotation in the file changed.

@github-actions github-actions / nitunit-services Results

<class> (nitunit.neo4j.CypherQuery) with error

nitunit.xml [took 0s]
Raw output
Runtime error in nitunit.out/neo4j-0.nit with argument 7
Neo4jClientError: cannot connect to server at <http://neo4j:7474>.
Runtime assert: [CurlError] Couldn't resolve host name (6) isa JsonObject
Runtime error: Assert failed (lib/neo4j/neo4j.nit:81)
-------------------------------------------------
--   Stack Trace   ------------------------------
-------------------------------------------------
` fatal_exit
` neo4j$Neo4jClient$defaultinit (lib/neo4j/neo4j.nit:78)
` neo4j-0::neo4j-0$core::Sys$run_7 (nitunit.out/neo4j-0.nit:93)
` neo4j-0::neo4j-0$core::Sys$main (nitunit.out/neo4j-0.nit:181)
` main
` __libc_init_first
` __libc_start_main
` _start
-------------------------------------------------
var client = new Neo4jClient("http://neo4j:7474")
var query = new CypherQuery
query.nmatch("(n)-[r:LOVES]->(m)")
query.nwhere("n.name=\"Andres\"")
query.nreturn("m.name")
var res = client.cypher(query).as(JsonObject)
assert res["data"].as(JsonArray).first.as(JsonArray).first == "Kate"

Check failure on line 0 in nitunit.neo4j.NeoEntity

See this annotation in the file changed.

@github-actions github-actions / nitunit-services Results

<class> (nitunit.neo4j.NeoEntity) with error

nitunit.xml [took 0s]
Raw output
Runtime error in nitunit.out/neo4j-0.nit with argument 9
Neo4jClientError: cannot connect to server at <http://neo4j:7474>.
Runtime assert: [CurlError] Couldn't resolve host name (6) isa JsonObject
Runtime error: Assert failed (lib/neo4j/neo4j.nit:81)
-------------------------------------------------
--   Stack Trace   ------------------------------
-------------------------------------------------
` fatal_exit
` neo4j$Neo4jClient$defaultinit (lib/neo4j/neo4j.nit:78)
` neo4j-0::neo4j-0$core::Sys$run_9 (nitunit.out/neo4j-0.nit:112)
` main
` __libc_init_first
` __libc_start_main
` _start
-------------------------------------------------
# Create a disconnected node
var andres = new NeoNode
andres["name"] = "Andres"
# At this point, the node is not linked
assert not andres.is_linked
# Init client
var client = new Neo4jClient("http://neo4j:7474")
client.save_node(andres)
# The node is now linked
assert andres.is_linked
# Get a node from Neo4j
var url = andres.url.to_s
var node = client.load_node(url)
assert node.is_linked
# Get the node `name` property
assert node["name"] == "Andres"	# loaded lazily from base

Check failure on line 0 in nitunit.neo4j.NeoNode

See this annotation in the file changed.

@github-actions github-actions / nitunit-services Results

<class> (nitunit.neo4j.NeoNode) with error

nitunit.xml [took 0s]
Raw output
Runtime error in nitunit.out/neo4j-0.nit with argument 10
Neo4jClientError: cannot connect to server at <http://neo4j:7474>.
Runtime assert: [CurlError] Couldn't resolve host name (6) isa JsonObject
Runtime error: Assert failed (lib/neo4j/neo4j.nit:81)
-------------------------------------------------
--   Stack Trace   ------------------------------
-------------------------------------------------
` fatal_exit
` neo4j$Neo4jClient$defaultinit (lib/neo4j/neo4j.nit:78)
` neo4j-0::neo4j-0$core::Sys$run_10 (nitunit.out/neo4j-0.nit:131)
` main
` __libc_init_first
` __libc_start_main
` _start
-------------------------------------------------
var client = new Neo4jClient("http://neo4j:7474")

var andres = new NeoNode
andres.labels.add "Person"
andres["name"] = "Andres"
andres["age"] = 22
client.save_node(andres)
assert andres.is_linked
var url = andres.url.to_s
var node = client.load_node(url)
assert node["name"] == "Andres"
assert node["age"].to_s.to_i	== 22

Check failure on line 0 in nitunit.neo4j.NeoEdge

See this annotation in the file changed.

@github-actions github-actions / nitunit-services Results

<class> (nitunit.neo4j.NeoEdge) with error

nitunit.xml [took 0s]
Raw output
Runtime error in nitunit.out/neo4j-0.nit with argument 11
Neo4jClientError: cannot connect to server at <http://neo4j:7474>.
Runtime assert: [CurlError] Couldn't resolve host name (6) isa JsonObject
Runtime error: Assert failed (lib/neo4j/neo4j.nit:81)
-------------------------------------------------
--   Stack Trace   ------------------------------
-------------------------------------------------
` fatal_exit
` neo4j$Neo4jClient$defaultinit (lib/neo4j/neo4j.nit:78)
` neo4j-0::neo4j-0$core::Sys$run_11 (nitunit.out/neo4j-0.nit:146)
` main
` __libc_init_first
` __libc_start_main
` _start
-------------------------------------------------
var client = new Neo4jClient("http://neo4j:7474")
# Create nodes
var andres = new NeoNode
andres["name"] = "Andres"
var kate = new NeoNode
kate["name"] = "Kate"
# Create a relationship of type `LOVES`
var loves = new NeoEdge(andres, "LOVES", kate)
client.save_edge(loves)
assert loves.is_linked
var url = loves.url.to_s
var edge = client.load_edge(url)
assert edge.from["name"].to_s == "Andres"
assert edge.to["name"].to_s == "Kate"

Check failure on line 0 in nitunit.neo4j.NeoBatch

See this annotation in the file changed.

@github-actions github-actions / nitunit-services Results

<class> (nitunit.neo4j.NeoBatch) with error

nitunit.xml [took 0s]
Raw output
Runtime error in nitunit.out/neo4j-0.nit with argument 12
Neo4jClientError: cannot connect to server at <http://neo4j:7474>.
Runtime assert: [CurlError] Couldn't resolve host name (6) isa JsonObject
Runtime error: Assert failed (lib/neo4j/neo4j.nit:81)
-------------------------------------------------
--   Stack Trace   ------------------------------
-------------------------------------------------
` fatal_exit
` neo4j$Neo4jClient$defaultinit (lib/neo4j/neo4j.nit:78)
` neo4j-0::neo4j-0$core::Sys$run_12 (nitunit.out/neo4j-0.nit:163)
` main
` __libc_init_first
` __libc_start_main
` _start
-------------------------------------------------
var client = new Neo4jClient("http://neo4j:7474")

var node1 = new NeoNode
var node2 = new NeoNode
var edge = new NeoEdge(node1, "TO", node2)

var batch = new NeoBatch(client)
batch.save_node(node1)
batch.save_node(node2)
batch.save_edge(edge)
batch.execute

assert node1.is_linked
assert node2.is_linked
assert edge.is_linked

Check failure on line 0 in nitunit.postgresql::postgres.<module>

See this annotation in the file changed.

@github-actions github-actions / nitunit-services Results

<module> (nitunit.postgresql::postgres.<module>) with error

nitunit.xml [took 0s]
Raw output
Runtime error in nitunit.out/postgres-1.nit with argument 0
Runtime assert: not <Postgres:#7f4a87dbbed0>.is_closed
Runtime error: Assert 'db_is_open' failed (nitunit.out/postgres-1.nit:23)
-------------------------------------------------
--   Stack Trace   ------------------------------
-------------------------------------------------
` fatal_exit
` postgres-1::postgres-1$core::Sys$main (nitunit.out/postgres-1.nit:11)
` main
` __libc_init_first
` __libc_start_main
` _start
-------------------------------------------------
class Animal
  var name: String
  var kind: String
  var age: Int
end

var animals = new Array[Animal]
var dog = new Animal("Lassy", "dog", 10)
var cat = new Animal("Garfield", "cat", 3)
var turtle = new Animal("George", "turtle", 123)

animals.add(dog)
animals.add(cat)
animals.add(turtle)

var db_suffix = "NIT_TESTING_ID".environ
var db = new Postgres.open("host=postgres user=postgres dbname=postgres")

assert db_is_open: not db.is_closed
assert create_table: db.create_table("IF NOT EXISTS animals_{db_suffix} (aname TEXT PRIMARY KEY, kind TEXT NOT NULL, age INT NOT NULL)") else print db.error

for animal in animals do
  assert insert: db.insert("INTO animals_{db_suffix} VALUES('{animal.name}', '{animal.kind}', {animal.age})") else print db.error
end

var result = db.raw_execute("SELECT * FROM animals_{db_suffix}")
assert  result.is_ok
assert drop_table: db.execute("DROP TABLE animals_{db_suffix}")
db.finish
assert db_is_closed: db.is_closed