File tree Expand file tree Collapse file tree 2 files changed +16
-6
lines changed Expand file tree Collapse file tree 2 files changed +16
-6
lines changed Original file line number Diff line number Diff line change 1414 - ' run_ci_tests.sh'
1515 - ' start_sshd.sh'
1616 - ' stop_sshd.sh'
17- name : cargo check
17+ name : os check
1818jobs :
1919 os-check :
2020 runs-on : ${{ matrix.os }}
2929 profile : minimal
3030 toolchain : stable
3131 - uses : actions/checkout@v2
32- - name : cargo check
32+ - name : Create Cargo.lock
3333 uses : actions-rs/cargo@v1
3434 with :
35- command : check
35+ command : update
36+ - name : cargo test
37+ uses : actions-rs/cargo@v1
38+ with :
39+ command : test
3640 args : --all-features --all-targets
Original file line number Diff line number Diff line change @@ -76,8 +76,10 @@ async fn connects() -> Vec<Session> {
7676}
7777
7878async fn connects_err ( host : & str ) -> Vec < Error > {
79- let mut builder = SessionBuilder :: default ( ) ;
79+ session_builder_connects_err ( host, SessionBuilder :: default ( ) ) . await
80+ }
8081
82+ async fn session_builder_connects_err ( host : & str , mut builder : SessionBuilder ) -> Vec < Error > {
8183 builder
8284 . user_known_hosts_file ( get_known_hosts_path ( ) )
8385 . known_hosts_check ( KnownHosts :: Accept ) ;
@@ -669,11 +671,15 @@ async fn cannot_resolve() {
669671
670672#[ tokio:: test]
671673async fn no_route ( ) {
672- for err in connects_err ( "255.255.255.255" ) . await {
674+ let mut builder = SessionBuilder :: default ( ) ;
675+
676+ builder. connect_timeout ( Duration :: from_secs ( 1 ) ) ;
677+
678+ for err in session_builder_connects_err ( "192.0.2.1" , builder) . await {
673679 match err {
674680 Error :: Connect ( e) => {
675681 eprintln ! ( "{:?}" , e) ;
676- assert_eq ! ( e. kind( ) , io:: ErrorKind :: Other ) ;
682+ assert_eq ! ( e. kind( ) , io:: ErrorKind :: TimedOut ) ;
677683 }
678684 e => unreachable ! ( "{:?}" , e) ,
679685 }
You can’t perform that action at this time.
0 commit comments