Skip to content
Snippets Groups Projects
Commit 0954fecb authored by Sergey Yakubov's avatar Sergey Yakubov
Browse files

fix tests

parent 7e44103b
Branches
Tags
No related merge requests found
......@@ -9,10 +9,11 @@ Cleanup() {
kill -9 $authorizeid
}
$@ -config settings.json > authorizer.log &
$@ -config settings.json &
sleep 0.3
authorizeid=`echo $!`
curl -v --silent --data '{"BeamtimeId":"c20180508-000-COM20181","OriginHost":"127.0.0.1:5555"}' 127.0.0.1:5007/authorize --stderr -
curl -v --silent --data '{"BeamtimeId":"c20180508-000-COM20181","OriginHost":"127.0.0.1:5555"}' 127.0.0.1:5007/authorize --stderr - | grep c20180508-000-COM20181
curl -v --silent --data '{"BeamtimeId":"c20180508-000-COM20181","OriginHost":"127.0.0.1:5555"}' 127.0.0.1:5007/authorize --stderr - | grep p01
SET database_name=data
SET mongo_exe="c:\Program Files\MongoDB\Server\3.6\bin\mongo.exe"
echo db.data.insert({"_id":1}) | %mongo_exe% %database_name% || goto :error
echo db.data.insert({"_id":2}) | %mongo_exe% %database_name% || goto :error
set full_name="%1"
set short_name="%~nx1"
......@@ -11,9 +5,8 @@ start /B "" "%full_name%" -config settings.json
ping 1.0.0.0 -n 1 -w 100 > nul
C:\Curl\curl.exe -v --silent 127.0.0.1:5005/database/data/next --stderr - | findstr /c:\"_id\":1 || goto :error
C:\Curl\curl.exe -v --silent 127.0.0.1:5005/database/data/next --stderr - | findstr /c:\"_id\":2 || goto :error
C:\Curl\curl.exe -v --silent 127.0.0.1:5005/database/data/next --stderr - | findstr /c:"not found" || goto :error
C:\Curl\curl.exe -v --silent --data '{"BeamtimeId":"c20180508-000-COM20181","OriginHost":"127.0.0.1:5555"}' 127.0.0.1:5007/authorize --stderr - | findstr c20180508-000-COM20181 || goto :error
C:\Curl\curl.exe -v --silent --data '{"BeamtimeId":"c20180508-000-COM20181","OriginHost":"127.0.0.1:5555"}' 127.0.0.1:5007/authorize --stderr - | findstr p01 || goto :error
goto :clean
......@@ -23,4 +16,3 @@ exit /b 1
:clean
Taskkill /IM "%short_name%" /F
echo db.dropDatabase() | %mongo_exe% %database_name%
SET mongo_exe="c:\Program Files\MongoDB\Server\3.6\bin\mongo.exe"
SET beamline=test
SET receiver_root_folder="c:\tmp\asapo\receiver\files"
SET receiver_root_folder=c:\tmp\asapo\receiver\files
SET receiver_folder="%receiver_root_folder%\%beamline%\%beamtime_id%"
......
SET mongo_exe="c:\Program Files\MongoDB\Server\3.6\bin\mongo.exe"
SET beamtime_id=asapo_test
SET beamline=test
SET receiver_root_folder="c:\tmp\asapo\receiver\files"
SET receiver_root_folder=c:\tmp\asapo\receiver\files
SET receiver_folder="%receiver_root_folder%\%beamline%\%beamtime_id%"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment