Skip to content

Commit

Permalink
fixup! Add tests for OSX and x86
Browse files Browse the repository at this point in the history
  • Loading branch information
JamesWrigley committed Oct 27, 2024
1 parent 19d2f04 commit 864da7b
Showing 1 changed file with 19 additions and 17 deletions.
36 changes: 19 additions & 17 deletions test/LibSSHTests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -285,26 +285,28 @@ end
@test client.callback_log[:message_request] == [(ssh.RequestType_ChannelOpen, lib.SSH_CHANNEL_DIRECT_TCPIP)]
end

@test false
# @testset "Keyboard-interactive authentication" begin
# @show readchomp(`which ssh`)
# @show readchomp(`which expect`)

# demo_server, _ = DemoServer(2222; auth_methods=[ssh.AuthMethod_Interactive]) do
# # Run the script
# script_path = joinpath(@__DIR__, "interactive_ssh.sh")
# proc = run(`expect -f $script_path`; wait=false)
# wait(proc)
# end
@testset "Keyboard-interactive authentication" begin
@show readchomp(`which ssh`)
@show readchomp(`which expect`)

demo_server, _ = DemoServer(2222; auth_methods=[ssh.AuthMethod_Interactive]) do
# Run the script
script_path = joinpath(@__DIR__, "interactive_ssh.sh")
@info "Running $(script_path)"
proc = run(`expect -f $script_path`; wait=false)
@info "started"
wait(proc)
@info "finished"
end

# client = demo_server.clients[1]
# client = demo_server.clients[1]

# # Check that authentication succeeded
# @test client.authenticated
# # Check that authentication succeeded
# @test client.authenticated

# # And the command was executed
# @test client.callback_log[:channel_exec_request] == ["'whoami'"]
# end
# # And the command was executed
# @test client.callback_log[:channel_exec_request] == ["'whoami'"]
end

@testset "Multiple connections" begin
demo_server, _ = DemoServer(2222; password="bar") do
Expand Down

0 comments on commit 864da7b

Please sign in to comment.