File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -355,3 +355,25 @@ pub fn prep_oci_spec_for_spawn(output: &str) -> Result<(), anyhow::Error> {
355355 . map_err ( |e| anyhow ! ( "building default oci spec: {e}" ) ) ?;
356356 spawn_auraed_oci_to ( PathBuf :: from ( output) , spec)
357357}
358+
359+ #[ cfg( test) ]
360+ mod tests {
361+ use super :: * ;
362+
363+ #[ test]
364+ fn auraed_runtime_default_socket_address_should_use_runtime_dir ( ) {
365+ let default_runtime = AuraedRuntime :: default ( ) ;
366+ assert_eq ! (
367+ default_runtime. default_socket_address( ) ,
368+ PathBuf :: from( "/var/run/aurae/aurae.sock" )
369+ ) ;
370+
371+ let custom_runtime_dir = PathBuf :: from ( "/tmp/aurae-test-runtime" ) ;
372+ let mut runtime = AuraedRuntime :: default ( ) ;
373+ runtime. runtime_dir = custom_runtime_dir. clone ( ) ;
374+ assert_eq ! (
375+ runtime. default_socket_address( ) ,
376+ custom_runtime_dir. join( "aurae.sock" )
377+ ) ;
378+ }
379+ }
You can’t perform that action at this time.
0 commit comments