File tree Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Expand file tree Collapse file tree 1 file changed +11
-6
lines changed Original file line number Diff line number Diff line change @@ -701,11 +701,16 @@ mod tests {
701701 } ;
702702 config. skopeo_cmd = Some ( Command :: new ( "no-skopeo" ) ) ;
703703
704- let res = ImageProxy :: new_with_config ( config) . await ;
705- assert ! ( matches!( res, Err ( Error :: SkopeoSpawnError ( _) ) ) ) ;
706- assert_eq ! (
707- res. err( ) . unwrap( ) . to_string( ) ,
708- "skopeo spawn error: No such file or directory (os error 2)"
709- ) ;
704+ match ImageProxy :: new_with_config ( config) . await {
705+ Ok ( _) => panic ! ( "Expected an error" ) ,
706+ Err ( ref e @ Error :: SkopeoSpawnError ( ref inner) ) => {
707+ assert_eq ! ( inner. kind( ) , std:: io:: ErrorKind :: NotFound ) ;
708+ // Just to double check
709+ assert ! ( e
710+ . to_string( )
711+ . contains( "skopeo spawn error: No such file or directory" ) ) ;
712+ }
713+ Err ( e) => panic ! ( "Unexpected error {e}" ) ,
714+ }
710715 }
711716}
You can’t perform that action at this time.
0 commit comments