test/toxiproxy_test.rb in toxiproxy-0.1.3 vs test/toxiproxy_test.rb in toxiproxy-0.1.4
- old
+ new
@@ -22,9 +22,16 @@
assert_equal "localhost:3306", proxy.upstream
assert_equal "test_mysql_master", proxy.name
end
+ def test_proxy_not_running_with_bad_host
+ Toxiproxy.host = 'http://0.0.0.0:12345'
+ assert !Toxiproxy.running?, 'toxiproxy should not be running'
+ ensure
+ Toxiproxy.host = Toxiproxy::DEFAULT_URI
+ end
+
def test_enable_and_disable_proxy
with_tcpserver do |port|
proxy = Toxiproxy.create(upstream: "localhost:#{port}", name: "test_rubby_server")
listen_addr = proxy.listen