-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathtest.bash
More file actions
executable file
·22 lines (18 loc) · 843 Bytes
/
Copy pathtest.bash
File metadata and controls
executable file
·22 lines (18 loc) · 843 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/bash
set -euo pipefail
AJV=./node_modules/.bin/ajv
AJV_CUSTOM_KEYWORDS=./tests/schema/ajv-custom-keywords.js
for schema in body-tree content-tree transit-tree; do
for datafile in tests/schema/"$schema"/valid/*; do
"$AJV" test --valid --allow-union-types -s schemas/"$schema".schema.json -d "$datafile"
done
for datafile in tests/schema/"$schema"/invalid/*; do
"$AJV" test --invalid --allow-union-types -s schemas/"$schema".schema.json -d "$datafile"
done
done
for datafile in tests/schema/"$schema"/valid/*; do
"$AJV" test --valid --allow-union-types -c "$AJV_CUSTOM_KEYWORDS" -s schemas/spark-transit-tree.schema.json -d "$datafile"
done
for datafile in tests/schema/"$schema"/invalid/*; do
"$AJV" test --invalid --allow-union-types -c "$AJV_CUSTOM_KEYWORDS" -s schemas/spark-transit-tree.schema.json -d "$datafile"
done