@@ -368,7 +368,7 @@ mod tests {
368
368
} ;
369
369
370
370
#[ test]
371
- fn test_container_builder ( ) {
371
+ fn builder ( ) {
372
372
let container_port: i32 = 10000 ;
373
373
let container_port_name = "foo_port_name" ;
374
374
let container_port_1: i32 = 20000 ;
@@ -428,7 +428,7 @@ mod tests {
428
428
}
429
429
430
430
#[ test]
431
- fn test_container_builder_lifecycle ( ) {
431
+ fn builder_lifecycle ( ) {
432
432
let post_start = LifecycleHandler {
433
433
exec : Some ( ExecAction {
434
434
command : Some ( vec ! [ "hello" . to_string( ) , "world" . to_string( ) ] ) ,
@@ -456,7 +456,7 @@ mod tests {
456
456
}
457
457
458
458
#[ test]
459
- fn test_container_port_builder ( ) {
459
+ fn port_builder ( ) {
460
460
let port: i32 = 10000 ;
461
461
let name = "FooBar" ;
462
462
let protocol = "http" ;
@@ -477,15 +477,16 @@ mod tests {
477
477
}
478
478
479
479
#[ test]
480
- pub fn test_field_ref_env_var_serialization ( ) {
480
+ pub fn field_ref_env_var_serialization ( ) {
481
481
assert_eq ! (
482
482
"metadata.labels['some-label-name']" ,
483
483
FieldPathEnvVar :: Labels ( "some-label-name" . to_string( ) ) . to_string( )
484
484
) ;
485
485
}
486
486
487
+ // TODO (@Techassi): Use rstest for name validation below
487
488
#[ test]
488
- fn test_container_name_max_len ( ) {
489
+ fn name_max_len ( ) {
489
490
let long_container_name =
490
491
"lengthexceededlengthexceededlengthexceededlengthexceededlengthex" ;
491
492
assert_eq ! ( long_container_name. len( ) , 64 ) ; // 63 characters is the limit for container names
@@ -512,12 +513,12 @@ mod tests {
512
513
}
513
514
514
515
#[ test]
515
- fn test_container_name_alphabet_only ( ) {
516
+ fn name_alphabet_only ( ) {
516
517
ContainerBuilder :: new ( "okname" ) . unwrap ( ) ;
517
518
}
518
519
519
520
#[ test]
520
- fn test_container_name_hyphen ( ) {
521
+ fn name_hyphen ( ) {
521
522
assert ! ( ContainerBuilder :: new( "name-with-hyphen" ) . is_ok( ) ) ;
522
523
assert_container_builder_err (
523
524
ContainerBuilder :: new ( "ends-with-hyphen-" ) ,
@@ -530,12 +531,12 @@ mod tests {
530
531
}
531
532
532
533
#[ test]
533
- fn test_container_name_contains_number ( ) {
534
+ fn name_contains_number ( ) {
534
535
assert ! ( ContainerBuilder :: new( "1name-0-name1" ) . is_ok( ) ) ;
535
536
}
536
537
537
538
#[ test]
538
- fn test_container_name_contains_underscore ( ) {
539
+ fn name_contains_underscore ( ) {
539
540
assert ! ( ContainerBuilder :: new( "name_name" ) . is_err( ) ) ;
540
541
assert_container_builder_err (
541
542
ContainerBuilder :: new ( "name_name" ) ,
@@ -544,7 +545,7 @@ mod tests {
544
545
}
545
546
546
547
#[ test]
547
- fn test_container_cpu_and_memory_resource_requirements ( ) {
548
+ fn cpu_and_memory_resource_requirements ( ) {
548
549
let resources = ResourceRequirementsBuilder :: new ( )
549
550
. with_cpu_request ( "2000m" )
550
551
. with_cpu_limit ( "3000m" )
0 commit comments