Skip to content

Commit c42e975

Browse files
committed
Travis config
9.5 support seems to be buggy -- try on 9.4. Can't run tests.sql because ASSERT was added in 9.5.
1 parent dd8b982 commit c42e975

File tree

4 files changed

+9
-5
lines changed

4 files changed

+9
-5
lines changed

.gitmodules

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "JSON-Schema-Test-Suite"]
2+
path = JSON-Schema-Test-Suite
3+
url = https://github.com/json-schema-org/JSON-Schema-Test-Suite.git

.travis.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
1-
sudo: false
21
install:
32
- pip install psycopg2
3+
- git submodule init
4+
- git submodule update
45
before_script:
56
psql -c 'CREATE DATABASE json_test;' -U postgres
67
env:
78
- DATABASE_URL=postgres:///json_test
89
services:
910
- postgresql
1011
addons:
11-
postgresql: "9.5"
12+
postgresql: "9.4"
1213
script: python test.py
1314
language: python

jsonschema.sql

+1-1
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ BEGIN
161161
SELECT regexp_replace(regexp_replace(path_part, '~1', '/'), '~0', '~')
162162
FROM UNNEST(regexp_split_to_array(schema->>'$ref', '/')) path_part
163163
);
164-
ASSERT path[1] = '#', 'only refs anchored at the root are supported';
164+
-- ASSERT path[1] = '#', 'only refs anchored at the root are supported';
165165
IF NOT validate_json_schema(root_schema #> path[2:array_length(path, 1)], data, root_schema) THEN
166166
RETURN false;
167167
END IF;

test.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
with open('jsonschema.sql') as f:
1414
cur.execute(f.read())
1515

16-
with open('tests.sql') as f:
17-
cur.execute(f.read())
16+
#with open('tests.sql') as f:
17+
#cur.execute(f.read())
1818

1919
EXCLUDE = {'optional', 'refRemote.json', 'definitions.json'}
2020

0 commit comments

Comments
 (0)