Skip to content

Commit

Permalink
Add tests for 'indices create'
Browse files Browse the repository at this point in the history
  • Loading branch information
WilliGautier committed Jul 23, 2024
1 parent 4c1cea3 commit 94e75ac
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions scripts/tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,25 @@ else
exit 1
fi

# ----------------------------------------------------------
echo "TEST add direct mapping on ES"
python3 -m arlas.cli.cli --config-file /tmp/arlas_cli.yaml indices --config tests create direct_mappping_index --mapping tests/mapping.json
if [ "$? -eq 0" ] ; then
echo "OK: Mapping added"
else
echo "ERROR: add direct mapping failed"
exit 1
fi

# ----------------------------------------------------------
echo "TEST retrieve direct mapping from ES"
if python3 -m arlas.cli.cli --config-file /tmp/arlas_cli.yaml indices --config tests list | grep direct_mappping_index ; then
echo "OK: direct mapping found"
else
echo "ERROR: direct mapping not found"
exit 1
fi

# ----------------------------------------------------------
echo "TEST infer mapping and add mapping on ES"
python3 -m arlas.cli.cli --config-file /tmp/arlas_cli.yaml indices --config tests mapping tests/sample.json --nb-lines 10 --field-mapping track.timestamps.center:date-epoch_second --field-mapping track.timestamps.start:date-epoch_second --field-mapping track.timestamps.end:date-epoch_second --push-on courses
Expand Down

0 comments on commit 94e75ac

Please sign in to comment.