File tree Expand file tree Collapse file tree
openshell-driver-docker/src
openshell-driver-kubernetes/src
openshell-driver-podman/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -395,14 +395,6 @@ fn build_environment_sets_docker_tls_paths() {
395395 assert ! ( env. contains( & "TEMPLATE_ENV=template" . to_string( ) ) ) ;
396396 assert ! ( env. contains( & "SPEC_ENV=spec" . to_string( ) ) ) ;
397397 assert ! ( env. contains( & "OPENSHELL_SANDBOX_COMMAND=sleep infinity" . to_string( ) ) ) ;
398- assert ! (
399- !env. iter( )
400- . any( |entry| entry. starts_with( "OPENSHELL_SSH_HANDSHAKE_SECRET=" ) )
401- ) ;
402- assert ! (
403- !env. iter( )
404- . any( |entry| entry. starts_with( "OPENSHELL_SSH_HANDSHAKE_SKEW_SECS=" ) )
405- ) ;
406398}
407399
408400#[ test]
Original file line number Diff line number Diff line change @@ -1503,30 +1503,6 @@ mod tests {
15031503 use super :: * ;
15041504 use prost_types:: { Struct , Value , value:: Kind } ;
15051505
1506- #[ test]
1507- fn apply_required_env_does_not_inject_handshake_env ( ) {
1508- let mut env = Vec :: new ( ) ;
1509- apply_required_env (
1510- & mut env,
1511- "sandbox-1" ,
1512- "my-sandbox" ,
1513- "https://endpoint:8080" ,
1514- "0.0.0.0:2222" ,
1515- true ,
1516- ) ;
1517-
1518- for name in [
1519- "OPENSHELL_SSH_HANDSHAKE_SECRET" ,
1520- "OPENSHELL_SSH_HANDSHAKE_SKEW_SECS" ,
1521- ] {
1522- assert ! (
1523- !env. iter( )
1524- . any( |e| e. get( "name" ) . and_then( |v| v. as_str( ) ) == Some ( name) ) ,
1525- "{name} must not appear in sandbox pod env after handshake-secret removal"
1526- ) ;
1527- }
1528- }
1529-
15301506 #[ test]
15311507 fn supervisor_sideload_injects_run_as_user_zero ( ) {
15321508 let mut pod_template = serde_json:: json!( {
Original file line number Diff line number Diff line change @@ -813,32 +813,6 @@ mod tests {
813813 ) ;
814814 }
815815
816- #[ test]
817- fn container_spec_does_not_inject_handshake_env ( ) {
818- let sandbox = test_sandbox ( "test-id" , "test-name" ) ;
819- let config = test_config ( ) ;
820- let spec = build_container_spec ( & sandbox, & config) ;
821-
822- let env_map = spec[ "env" ] . as_object ( ) . expect ( "env should be an object" ) ;
823- for name in [
824- "OPENSHELL_SSH_HANDSHAKE_SECRET" ,
825- "OPENSHELL_SSH_HANDSHAKE_SKEW_SECS" ,
826- ] {
827- assert ! (
828- !env_map. contains_key( name) ,
829- "{name} must not appear in container env"
830- ) ;
831- }
832-
833- let secret_env = spec[ "secret_env" ]
834- . as_object ( )
835- . expect ( "secret_env should be an object" ) ;
836- assert ! (
837- !secret_env. contains_key( "OPENSHELL_SSH_HANDSHAKE_SECRET" ) ,
838- "handshake secret must not appear in secret_env"
839- ) ;
840- }
841-
842816 #[ test]
843817 fn container_spec_sets_sandbox_name_in_env ( ) {
844818 let sandbox = test_sandbox ( "test-id" , "my-sandbox" ) ;
Original file line number Diff line number Diff line change @@ -2817,11 +2817,6 @@ mod tests {
28172817 assert ! ( env. contains( & format!(
28182818 "OPENSHELL_SSH_SOCKET_PATH={GUEST_SSH_SOCKET_PATH}"
28192819 ) ) ) ;
2820- assert ! (
2821- !env. iter( )
2822- . any( |e| e. starts_with( "OPENSHELL_SSH_HANDSHAKE_SECRET=" ) ) ,
2823- "SSH handshake secret must not be injected into guest env"
2824- ) ;
28252820 }
28262821
28272822 #[ test]
You can’t perform that action at this time.
0 commit comments