diff options
author | Alex Crichton <alex@alexcrichton.com> | 2014-11-18 09:10:37 -0800 |
---|---|---|
committer | Alex Crichton <alex@alexcrichton.com> | 2014-11-18 09:10:37 -0800 |
commit | 6118d76bb383420be32160af866cbe5fc7141f42 (patch) | |
tree | 8c7153acd116d165859f43017436c53158477400 /tests | |
parent | 84bea90ea3106c7f17857705fd2b3557ac236e02 (diff) | |
download | ssh2-rs-6118d76bb383420be32160af866cbe5fc7141f42.zip |
Update to rust master
Diffstat (limited to 'tests')
-rw-r--r-- | tests/session.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/session.rs b/tests/session.rs index a2cc1f0..b13bc95 100644 --- a/tests/session.rs +++ b/tests/session.rs @@ -1,7 +1,7 @@ use std::os; use std::io::{mod, File, TempDir}; -use ssh2::{mod, Session}; +use ssh2::{mod, Session, MethodType, HashType}; #[test] fn smoke() { @@ -12,12 +12,12 @@ fn smoke() { assert_eq!(sess.timeout(), 0); sess.flag(ssh2::Compress, true).unwrap(); assert!(sess.host_key().is_none()); - sess.method_pref(ssh2::MethodKex, "diffie-hellman-group14-sha1").unwrap(); - assert!(sess.methods(ssh2::MethodKex).is_none()); + sess.method_pref(MethodType::Kex, "diffie-hellman-group14-sha1").unwrap(); + assert!(sess.methods(MethodType::Kex).is_none()); sess.set_blocking(true); sess.set_timeout(0); - sess.supported_algs(ssh2::MethodKex).unwrap(); - sess.supported_algs(ssh2::MethodHostKey).unwrap(); + sess.supported_algs(MethodType::Kex).unwrap(); + sess.supported_algs(MethodType::HostKey).unwrap(); sess.channel_session().err().unwrap(); } @@ -40,7 +40,7 @@ fn smoke_handshake() { agent.userauth(user.as_slice(), &identity).unwrap(); } assert!(sess.authenticated()); - sess.host_key_hash(ssh2::HashMd5).unwrap(); + sess.host_key_hash(HashType::Md5).unwrap(); } #[test] |