Skip to content

Commit

Permalink
Hide the curl progress meter in the tests
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesWrigley committed Oct 27, 2024
1 parent 8f28414 commit 6c90f6f
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions test/LibSSHTests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import LibSSH: Demo, lib, KbdintPrompt
import LibSSH.Demo: DemoServer


curl_cmd = `$(curl()) --no-progress-meter`
username() = Sys.iswindows() ? ENV["USERNAME"] : ENV["USER"]

const HTTP_200 = "HTTP/1.1 200 OK\r\n\r\n"
Expand Down Expand Up @@ -248,7 +249,7 @@ end
@testset "Direct port forwarding" begin
# Test the dummy HTTP server we'll use later
http_server(9090) do
@test run(`$(curl()) localhost:9090`).exitcode == 0
@test run(`$(curl_cmd) localhost:9090`).exitcode == 0
end

# Test direct port forwarding
Expand All @@ -269,7 +270,7 @@ end
# on the listening port, so we only need the HTTP server running
# while we're making the request.
http_server(9090) do
curl_process = run(ignorestatus(`$(curl()) localhost:8080`))
curl_process = run(ignorestatus(`$(curl_cmd) localhost:8080`))
@test curl_process.exitcode == 0
end

Expand Down Expand Up @@ -604,7 +605,7 @@ end
show(IOBuffer(), forwarder)

http_server(9090) do
curl_proc = run(ignorestatus(`$(curl()) localhost:8080`); wait=false)
curl_proc = run(ignorestatus(`$(curl_cmd) localhost:8080`); wait=false)
try
wait(curl_proc)
finally
Expand Down

0 comments on commit 6c90f6f

Please sign in to comment.