diff --git a/scripts/tests.sh b/scripts/tests.sh index d1b2e70..af42a37 100755 --- a/scripts/tests.sh +++ b/scripts/tests.sh @@ -17,7 +17,7 @@ fi # ---------------------------------------------------------- echo "TEST infer mapping and add mapping on ES" -python3 -m arlas.cli.cli indices --config local mapping tests/sample.json --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 +python3 -m arlas.cli.cli indices --config local 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 if [ "$? -eq 0" ] ; then echo "OK: Mapping infered and added" else @@ -56,7 +56,8 @@ sleep 2 # ---------------------------------------------------------- echo "TEST retrieve hits from ES" -if python3 -m arlas.cli.cli indices --config local list | grep courses | grep " 2 "; then +python3 -m arlas.cli.cli indices --config local list +if python3 -m arlas.cli.cli indices --config local list | grep courses | grep " 100 "; then echo "OK: two hits found" else echo "ERROR: hits not found"