Skip to content
Snippets Groups Projects
Commit 07e8a403 authored by Henrik tom Wörden's avatar Henrik tom Wörden
Browse files

DOC: more hints on running int tests

parent 12d9f011
Branches
Tags
1 merge request!22Release 0.3
Pipeline #12697 passed
...@@ -39,9 +39,11 @@ Optional h5-crawler: ...@@ -39,9 +39,11 @@ Optional h5-crawler:
extroot. E.g. `sudo mount -o bind extroot extroot. E.g. `sudo mount -o bind extroot
../../caosdb-deploy/profiles/empty/paths/extroot` (or whatever path ../../caosdb-deploy/profiles/empty/paths/extroot` (or whatever path
the extroot of the empty profile to be used is located at). the extroot of the empty profile to be used is located at).
3. Start an empty (!) CaosDB instance (with the mounted extroot). The 3. Start (or restart) an empty (!) CaosDB instance (with the mounted extroot).
database will be cleared during testing, so it's important to use The database will be cleared during testing, so it's important to use
an empty instance. an empty instance.
Make sure your configuration for the python caosdb module is correct and
allows to connect to the server.
4. Run `test.sh`. Note that this may modify content of the `integrationtest/extroot/` directory. 4. Run `test.sh`. Note that this may modify content of the `integrationtest/extroot/` directory.
## Code Formatting ## Code Formatting
......
...@@ -34,11 +34,11 @@ echo "Filling the database" ...@@ -34,11 +34,11 @@ echo "Filling the database"
echo "Testing the crawler database" echo "Testing the crawler database"
python3 -m pytest test_crawler_with_cfoods.py python3 -m pytest test_crawler_with_cfoods.py
echo "make a change" echo "make a change"
pushd extroot cd extroot
egrep -liRZ 'A description of another example' . | xargs -0 -l sed -i -e 's/A description of another example/A description of this example/g' egrep -liRZ 'A description of another example' . | xargs -0 -l sed -i -e 's/A description of another example/A description of this example/g'
# remove a file to check that this does not lead to a crawler crash # remove a file to check that this does not lead to a crawler crash
mv DataAnalysis/2010_TestProject/2019-02-03_something/README.xlsx DataAnalysis/2010_TestProject/2019-02-03_something/README.xlsx_back mv DataAnalysis/2010_TestProject/2019-02-03_something/README.xlsx DataAnalysis/2010_TestProject/2019-02-03_something/README.xlsx_back
popd cd ..
echo "run crawler" echo "run crawler"
./crawl.py / | tee $OUT ./crawl.py / | tee $OUT
# rename the moved file # rename the moved file
...@@ -58,9 +58,9 @@ then ...@@ -58,9 +58,9 @@ then
fi fi
set -e set -e
echo "undo changes" echo "undo changes"
pushd extroot cd extroot
egrep -liRZ 'A description of this example' . | xargs -0 -l sed -i -e 's/A description of this example/A description of another example/g' egrep -liRZ 'A description of this example' . | xargs -0 -l sed -i -e 's/A description of this example/A description of another example/g'
popd cd ..
python3 test_table.py python3 test_table.py
# TODO the following test deletes lots of the data inserted by the crawler # TODO the following test deletes lots of the data inserted by the crawler
echo "Testing im and export" echo "Testing im and export"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment