Skip to content
This repository was archived by the owner on Jan 8, 2026. It is now read-only.

Commit ac0402b

Browse files
Get build passing on Travis.
Set up neo4j through the .travis.yml, following workaround described at travis-ci/travis-ci#3243. One test was failing: "test commit: many invalid statements (NeoxirTest.Commit)" because the response returned from neo4j has changed slightly since the test was originally written. Relaxed the assertion with a Regex.
1 parent 3d87805 commit ac0402b

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

.travis.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,15 @@ notifications:
33
recipients:
44
otp_release:
55
- 17.1
6+
jdk:
7+
- oraclejdk7
68
before_install:
9+
# install Neo4j locally:
10+
- wget dist.neo4j.org/neo4j-community-2.2.2-unix.tar.gz
11+
- tar -xzf neo4j-community-2.2.2-unix.tar.gz
12+
- sed -i.bak s/dbms.security.auth_enabled=true/dbms.security.auth_enabled=false/g neo4j-community-2.2.2/conf/neo4j-server.properties
13+
- neo4j-community-2.2.2/bin/neo4j start
14+
# install elixir
715
- wget http://s3.hex.pm/builds/elixir/v1.0.0.zip
816
- unzip -d elixir v1.0.0.zip
917
before_script:

test/neoxir_test.exs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,11 @@ defmodule NeoxirTest do
7474
[statement: "AAAAREATE (n) RETURN ID(n) as x2"]
7575
]
7676

77-
{:error, _, response} = commit(session, statements)
78-
assert response == [%{"code" => "Neo.ClientError.Statement.InvalidSyntax",
79-
"message" => "Invalid input 'Q': expected <init> (line 1, column 1)\n\"QQCREATE (n) RETURN ID(n) as x1\"\n ^"}]
77+
{:error, _, [response|_]} = commit(session, statements)
78+
assert response["code"] == "Neo.ClientError.Statement.InvalidSyntax"
79+
assert Regex.match?(~r/Invalid input/, response["message"])
8080
end
8181

82-
8382
# commit!
8483

8584
test "commit!: single valid statement", %{session: session} do

0 commit comments

Comments
 (0)