@@ -368,7 +368,7 @@ mod tests {
368368 } ;
369369
370370 #[ test]
371- fn test_container_builder ( ) {
371+ fn builder ( ) {
372372 let container_port: i32 = 10000 ;
373373 let container_port_name = "foo_port_name" ;
374374 let container_port_1: i32 = 20000 ;
@@ -428,7 +428,7 @@ mod tests {
428428 }
429429
430430 #[ test]
431- fn test_container_builder_lifecycle ( ) {
431+ fn builder_lifecycle ( ) {
432432 let post_start = LifecycleHandler {
433433 exec : Some ( ExecAction {
434434 command : Some ( vec ! [ "hello" . to_string( ) , "world" . to_string( ) ] ) ,
@@ -456,7 +456,7 @@ mod tests {
456456 }
457457
458458 #[ test]
459- fn test_container_port_builder ( ) {
459+ fn port_builder ( ) {
460460 let port: i32 = 10000 ;
461461 let name = "FooBar" ;
462462 let protocol = "http" ;
@@ -477,15 +477,16 @@ mod tests {
477477 }
478478
479479 #[ test]
480- pub fn test_field_ref_env_var_serialization ( ) {
480+ pub fn field_ref_env_var_serialization ( ) {
481481 assert_eq ! (
482482 "metadata.labels['some-label-name']" ,
483483 FieldPathEnvVar :: Labels ( "some-label-name" . to_string( ) ) . to_string( )
484484 ) ;
485485 }
486486
487+ // TODO (@Techassi): Use rstest for name validation below
487488 #[ test]
488- fn test_container_name_max_len ( ) {
489+ fn name_max_len ( ) {
489490 let long_container_name =
490491 "lengthexceededlengthexceededlengthexceededlengthexceededlengthex" ;
491492 assert_eq ! ( long_container_name. len( ) , 64 ) ; // 63 characters is the limit for container names
@@ -512,12 +513,12 @@ mod tests {
512513 }
513514
514515 #[ test]
515- fn test_container_name_alphabet_only ( ) {
516+ fn name_alphabet_only ( ) {
516517 ContainerBuilder :: new ( "okname" ) . unwrap ( ) ;
517518 }
518519
519520 #[ test]
520- fn test_container_name_hyphen ( ) {
521+ fn name_hyphen ( ) {
521522 assert ! ( ContainerBuilder :: new( "name-with-hyphen" ) . is_ok( ) ) ;
522523 assert_container_builder_err (
523524 ContainerBuilder :: new ( "ends-with-hyphen-" ) ,
@@ -530,12 +531,12 @@ mod tests {
530531 }
531532
532533 #[ test]
533- fn test_container_name_contains_number ( ) {
534+ fn name_contains_number ( ) {
534535 assert ! ( ContainerBuilder :: new( "1name-0-name1" ) . is_ok( ) ) ;
535536 }
536537
537538 #[ test]
538- fn test_container_name_contains_underscore ( ) {
539+ fn name_contains_underscore ( ) {
539540 assert ! ( ContainerBuilder :: new( "name_name" ) . is_err( ) ) ;
540541 assert_container_builder_err (
541542 ContainerBuilder :: new ( "name_name" ) ,
@@ -544,7 +545,7 @@ mod tests {
544545 }
545546
546547 #[ test]
547- fn test_container_cpu_and_memory_resource_requirements ( ) {
548+ fn cpu_and_memory_resource_requirements ( ) {
548549 let resources = ResourceRequirementsBuilder :: new ( )
549550 . with_cpu_request ( "2000m" )
550551 . with_cpu_limit ( "3000m" )
0 commit comments