From 3066498c16f6efa23ef75464bfc0ba57453c9538 Mon Sep 17 00:00:00 2001 From: MSP-Greg Date: Mon, 29 Jul 2019 20:16:09 -0500 Subject: [PATCH] fix test/test_unix_socket.rb (#1870) Fix to work reliably on platforms without UNIXSockets --- test/test_unix_socket.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/test_unix_socket.rb b/test/test_unix_socket.rb index 870a9423..31b38493 100644 --- a/test/test_unix_socket.rb +++ b/test/test_unix_socket.rb @@ -9,17 +9,19 @@ class TestPumaUnixSocket < Minitest::Test Path = "test/puma.sock" def setup - skip UNIX_SKT_MSG unless UNIX_SKT_EXIST + return unless UNIX_SKT_EXIST @server = Puma::Server.new App @server.add_unix_listener Path @server.run end def teardown + return unless UNIX_SKT_EXIST @server.stop(true) end def test_server + skip UNIX_SKT_MSG unless UNIX_SKT_EXIST sock = UNIXSocket.new Path sock << "GET / HTTP/1.0\r\nHost: blah.com\r\n\r\n"