CC-5651: Unit Test the Scheduler
Creat a rabbitmq vhost and user before running tests so airtime doesn't have to be installed
This commit is contained in:
parent
a59453cde5
commit
4beb06a1d9
2 changed files with 23 additions and 2 deletions
|
@ -7,8 +7,8 @@ dbpass = airtime
|
|||
[rabbitmq]
|
||||
host = 127.0.0.1
|
||||
port = 5672
|
||||
user = airtime
|
||||
password = GEN7GWIOB66FFKY30ERF
|
||||
user = airtime_tests
|
||||
password = airtime_tests
|
||||
vhost = /airtime
|
||||
|
||||
[general]
|
||||
|
|
|
@ -1,5 +1,26 @@
|
|||
#!/bin/bash
|
||||
|
||||
RABBITMQ_VHOST="/airtime"
|
||||
RABBITMQ_USER="airtime_tests"
|
||||
RABBITMQ_PASSWORD="airtime_tests"
|
||||
EXCHANGES="airtime-pypo|pypo-fetch|airtime-media-monitor|media-monitor"
|
||||
|
||||
rabbitmqctl list_vhosts | grep $RABBITMQ_VHOST
|
||||
RESULT="$?"
|
||||
|
||||
if [ $RESULT = "0" ]; then
|
||||
rabbitmqctl delete_vhost $RABBITMQ_VHOST
|
||||
rabbitmqctl delete_user $RABBITMQ_USER
|
||||
fi
|
||||
|
||||
rabbitmqctl add_vhost $RABBITMQ_VHOST
|
||||
rabbitmqctl add_user $RABBITMQ_USER $RABBITMQ_PASSWORD
|
||||
rabbitmqctl set_permissions -p $RABBITMQ_VHOST $RABBITMQ_USER "$EXCHANGES" "$EXCHANGES" "$EXCHANGES"
|
||||
|
||||
export RABBITMQ_USER
|
||||
export RABBITMQ_PASSWORD
|
||||
export RABBITMQ_VHOST
|
||||
|
||||
export AIRTIME_UNIT_TEST="1"
|
||||
phpunit
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue