Skip to content

Commit 44c839c

Browse files
committed
avoid writing into package depot dir
1 parent 82930e5 commit 44c839c

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

test/runtests_routeguide.jl

+7-4
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,13 @@ end
4949
function test_generate()
5050
@testset "codegen" begin
5151
dir = joinpath(@__DIR__, "RouteguideClients")
52-
gRPCClient.generate(joinpath(dir, "route_guide.proto"); outdir=dir)
53-
@test isfile(joinpath(dir, "route_guide_pb.jl"))
54-
@test isfile(joinpath(dir, "routeguide.jl"))
55-
@test isfile(joinpath(dir, "RouteguideClients.jl"))
52+
# generate into tempdir to avoid writing inside depot folder
53+
mktempdir() do outdir
54+
gRPCClient.generate(joinpath(dir, "route_guide.proto"); outdir=outdir)
55+
@test isfile(joinpath(dir, "route_guide_pb.jl"))
56+
@test isfile(joinpath(dir, "routeguide.jl"))
57+
@test isfile(joinpath(dir, "RouteguideClients.jl"))
58+
end
5659
end
5760
end
5861

0 commit comments

Comments
 (0)