about summary refs log tree commit homepage
path: root/test/test_serve_static.rb
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2016-02-29 08:18:55 +0000
committerEric Wong <e@80x24.org>2016-02-29 08:22:02 +0000
commit7ee064f52ee740eeafa49089911f6eca18c67e38 (patch)
tree6bf2588b7d3b992d38b7056d8a230367cde479eb /test/test_serve_static.rb
parent5fff94f35928feeb9d6bf91087ee7cdbe97ecdb7 (diff)
downloadyahns-7ee064f52ee740eeafa49089911f6eca18c67e38.tar.gz
We should not infinite loop, oops :x
Also, ensure 'yahns' is in the directory in case tests are
SIGKILL-ed and directories are left over.
Diffstat (limited to 'test/test_serve_static.rb')
-rw-r--r--test/test_serve_static.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/test_serve_static.rb b/test/test_serve_static.rb
index 12932d2..68e84f7 100644
--- a/test/test_serve_static.rb
+++ b/test/test_serve_static.rb
@@ -10,7 +10,7 @@ class TestServeStatic < Testcase
   alias teardown server_helper_teardown
 
   def test_serve_static
-    tmpdir = Dir.mktmpdir
+    tmpdir = yahns_mktmpdir
     sock = "#{tmpdir}/sock"
     err = @err
     cfg = Yahns::Config.new
@@ -120,7 +120,7 @@ class TestServeStatic < Testcase
   end
 
   def test_aborted_sendfile_closes_opened_path
-    tmpdir = Dir.mktmpdir
+    tmpdir = yahns_mktmpdir
     mksparse(tmpdir)
     fifo = "#{tmpdir}/to_path--close"
     assert system("mkfifo", fifo), "mkfifo"
@@ -147,7 +147,7 @@ class TestServeStatic < Testcase
   end
 
   def test_truncated_sendfile
-    tmpdir = Dir.mktmpdir
+    tmpdir = yahns_mktmpdir
     size, sparse = mksparse(tmpdir)
     err, cfg, host, port = @err, Yahns::Config.new, @srv.addr[3], @srv.addr[1]
     pid = mkserver(cfg) do
@@ -169,7 +169,7 @@ class TestServeStatic < Testcase
   end
 
   def test_expanded_sendfile
-    tmpdir = Dir.mktmpdir
+    tmpdir = yahns_mktmpdir
     size, sparse = mksparse(tmpdir)
     err, cfg, host, port = @err, Yahns::Config.new, @srv.addr[3], @srv.addr[1]
     pid = mkserver(cfg) do