File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2828 # Use the service name 'rabbitmq' as the host, not localhost
2929 RABBITMQ_URL : " amqp://demo:demo@rabbitmq:5672"
3030 RABBITMQ_HOST : rabbitmq
31+ RABBITMQ_MANAGEMENT_URL : " http://demo:demo@rabbitmq:15672"
3132
3233 services :
3334 rabbitmq :
8384 echo "RabbitMQ failed to start"
8485 exit 1
8586
87+ - name : Configure RabbitMQ Management user "demo"
88+ run : |
89+ docker exec ${{ job.services.rabbitmq.id }} rabbitmqctl set_user_tags "demo" administrator
90+ docker exec ${{ job.services.rabbitmq.id }} rabbitmqctl set_permissions -p / "demo" ".*" ".*" ".*"
91+
8692 - name : Run Tests
8793 run : |
8894 git config --global --add safe.directory /__w/action_subscriber/action_subscriber
Original file line number Diff line number Diff line change @@ -12,10 +12,10 @@ def spoke
1212 default_routes_for GusSubscriber
1313 end
1414 end
15- let ( :rabbitmq_host ) {
16- ENV [ "RABBITMQ_HOST " ] || "127.0.0.1"
15+ let ( :rabbitmq_management_url ) {
16+ ENV [ "RABBITMQ_MANAGEMENT_URL " ] || "http:// 127.0.0.1:15672 "
1717 }
18- let ( :http_client ) { RabbitMQ ::HTTP ::Client . new ( "http:// #{ rabbitmq_host } :15672" ) }
18+ let ( :http_client ) { RabbitMQ ::HTTP ::Client . new ( rabbitmq_management_url ) }
1919 let ( :subscriber ) { GusSubscriber }
2020
2121 it "reconnects when a connection drops" do
Original file line number Diff line number Diff line change @@ -14,10 +14,10 @@ def created
1414 end
1515 end
1616
17- let ( :rabbitmq_host ) {
18- ENV [ "RABBITMQ_HOST " ] || "127.0.0.1"
17+ let ( :rabbitmq_management_url ) {
18+ ENV [ "RABBITMQ_MANAGEMENT_URL " ] || "http:// 127.0.0.1:15672 "
1919 }
20- let ( :http_client ) { :: RabbitMQ ::HTTP ::Client . new ( "http:// #{ rabbitmq_host } :15672" ) }
20+ let ( :http_client ) { RabbitMQ ::HTTP ::Client . new ( rabbitmq_management_url ) }
2121 let ( :subscriber ) { ::YoloSubscriber }
2222
2323 it "resubscribes on cancellation" do
You can’t perform that action at this time.
0 commit comments