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 af43fd8 commit 19d2f04
Showing 1 changed file with 17 additions and 16 deletions.
33 changes: 17 additions & 16 deletions test/LibSSHTests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -285,25 +285,26 @@ end
@test client.callback_log[:message_request] == [(ssh.RequestType_ChannelOpen, lib.SSH_CHANNEL_DIRECT_TCPIP)]
end

@show readchomp(`which ssh`)
@testset "Keyboard-interactive authentication" begin
@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
@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

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 19d2f04

Please sign in to comment.