kill test bots after some time

This commit is contained in:
Aleksej 2022-06-13 22:24:07 +02:00
parent 464d721af6
commit 19aa4e12d5
No known key found for this signature in database
GPG Key ID: 4DB9C85100A6D17F

View File

@ -15,10 +15,20 @@ docker exec -it xmppbot-test bin/ejabberdctl create_room testroom1 conference.lo
docker exec -it xmppbot-test bin/ejabberdctl create_room testroom2 conference.localhost localhost
# Run xmpp mirror bot
python3 ../xmppmirror &
python3 ../xmppmirror & XMPPMIRRORPID=$!
# Run xmpp test bot
python3 testbot
python3 testbot & TESTBOTPID=$!
# Wait for bots to connect
sleep 10
# Wait certain amount of time for every test message in the file
for i in $(cat testmsgs); do sleep 5; done
# Kill bots
kill XMPPMIRRORPID
kill TESTBOTPID
# Stop and remove containter
docker stop xmppbot-test