features/support/firewall_helper.rb in message-driver-0.1.0 vs features/support/firewall_helper.rb in message-driver-0.2.0.rc1

- old
+ new

@@ -1,28 +1,25 @@ module FirewallHelper + def self.port + BrokerConfig.current_adapter_port + end + COMMANDS = { darwin: { setup: [ - "sudo ipfw add 02070 deny tcp from any to any 5672" + "lunchy stop rabbit" ], teardown: [ - "sudo ipfw delete 02070" + "lunchy start rabbit" ] }, linux: { setup: [ - "sudo iptables -N block-rabbit", - "sudo iptables -A block-rabbit -p tcp --dport 5672 -j DROP", - "sudo iptables -A block-rabbit -p tcp --sport 5672 -j DROP", - "sudo iptables -I INPUT -j block-rabbit", - "sudo iptables -I OUTPUT -j block-rabbit" + "sudo service rabbitmq-server stop" ], teardown: [ - "sudo iptables -D INPUT -j block-rabbit", - "sudo iptables -D OUTPUT -j block-rabbit", - "sudo iptables -F block-rabbit", - "sudo iptables -X block-rabbit" + "sudo service rabbitmq-server start" ] } } def block_broker_port