8000 use dirname(@__FILE__) rather than Pkg.dir · JuliaWeb/HttpServer.jl@b3856f2 · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Sep 4, 2019. It is now read-only.

Commit b3856f2

Browse files
authored
use dirname(@__FILE__) rather than Pkg.dir
this allows installing the package elsewhere
1 parent 29f66ad commit b3856f2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/runtests.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,8 @@ facts("HttpServer runs") do
110110
Response("hello")
111111
end
112112
server = Server(http)
113-
cert = MbedTLS.crt_parse_file(Pkg.dir("HttpServer","test","cert.pem"))
114-
key = MbedTLS.parse_keyfile(Pkg.dir("HttpServer","test","key.pem"))
113+
cert = MbedTLS.crt_parse_file(joinpath(dirname(@__FILE__),"cert.pem"))
114+
key = MbedTLS.parse_keyfile(joinpath(dirname(@__FILE__),"key.pem"))
115115
@async run(server, port=8002, ssl=(cert, key))
116116
sleep(1.0)
117117
client_tls_conf = Requests.TLS_VERIFY
@@ -126,8 +126,8 @@ facts("HttpServer runs") do
126126
Response("hello")
127127
end
128128
server = Server(http)
129-
cert = MbedTLS.crt_parse_file(Pkg.dir("HttpServer","test","cert.pem"))
130-
key = MbedTLS.parse_keyfile(Pkg.dir("HttpServer","test","key.pem"))
129+
cert = MbedTLS.crt_parse_file(joinpath(dirname(@__FILE__),"cert.pem"))
130+
key = MbedTLS.parse_keyfile(joinpath(dirname(@__FILE__),"key.pem"))
131131
@async run(server, port=8002, ssl=(cert, key))
132132
sleep(1.0)
133133
client_tls_conf = Requests.TLS_VERIFY

0 commit comments

Comments
 (0)
0