]> granicus.if.org Git - pdns/commitdiff
Use absolute path
authorAki Tuomi <cmouse@desteem.org>
Wed, 28 May 2014 07:36:39 +0000 (10:36 +0300)
committerAki Tuomi <cmouse@desteem.org>
Wed, 28 May 2014 07:36:39 +0000 (10:36 +0300)
modules/remotebackend/regression-tests/http-backend.rb
modules/remotebackend/regression-tests/pipe-backend.rb
modules/remotebackend/regression-tests/unix-backend.rb
modules/remotebackend/regression-tests/zeromq-backend.rb

index 21b5e808e2e2ad49efe5a980fde76e25c3f61856..6b8f7fff6fb88593530e12b27125485806adb5eb 100755 (executable)
@@ -5,6 +5,7 @@ require "webrick"
 $:.unshift File.dirname(__FILE__)
 require "dnsbackend"
 require "backend"
+require "pathname"
 
 server = WEBrick::HTTPServer.new(
        :Port=>62434,
@@ -13,7 +14,7 @@ server = WEBrick::HTTPServer.new(
        :AccessLog=>[ [ File.open("remotebackend-access.log", "w"), WEBrick::AccessLog::COMBINED_LOG_FORMAT ] ] 
 )
 
-be = Handler.new("#{File.dirname(__FILE__)}/remote.sqlite3")
+be = Handler.new(Pathname.new(File.join(File.dirname(__FILE__),"remote.sqlite3")).realpath.to_s)
 server.mount "/dns", DNSBackendHandler, be
 server.mount_proc("/ping"){ |req,resp| resp.body = "pong" }
 
index 39db7a2140b7ff972a8cbe81ae9a9fbdc432f3af..993000e9f08166492eb7104289e6c12ef3ef730c 100755 (executable)
@@ -5,7 +5,7 @@ require 'json'
 $:.unshift File.dirname(__FILE__)
 require "backend"
 
-h = Handler.new("#{File.dirname(__FILE__)}/remote.sqlite3")
+h = Handler.new(Pathname.new(File.join(File.dirname(__FILE__),"remote.sqlite3")).realpath.to_s)
 
 f = File.open "/tmp/remotebackend.txt.#{$$}","a"
 f.sync = true
index c3037146af1a27129f79edc818fb16b050b645ee..c4adbb90c8ffd7364f0e4b8da3fcc03912069227 100755 (executable)
@@ -5,7 +5,7 @@ require 'json'
 $:.unshift File.dirname(__FILE__)
 require "backend"
 
-h = Handler.new("#{File.dirname(__FILE__)}/remote.sqlite3")
+h = Handler.new(Pathname.new(File.join(File.dirname(__FILE__),"remote.sqlite3")).realpath.to_s)
 
 f = File.open "/tmp/remotebackend.txt.#{$$}","a"
 f.sync = true
index 63d152631b29cd4da56397dac88470b0e4f4493a..c8f72582163ba69badfe0acc447d2dc5b90eaafc 100755 (executable)
@@ -6,7 +6,7 @@ require 'zero_mq'
 $:.unshift File.dirname(__FILE__)
 require "backend"
 
-h = Handler.new("#{File.dirname(__FILE__)}/remote.sqlite3")
+h = Handler.new(Pathname.new(File.join(File.dirname(__FILE__),"remote.sqlite3")).realpath.to_s)
 
 f = File.open "/tmp/remotebackend.txt.#{$$}","a"
 f.sync = true