File tree Expand file tree Collapse file tree 1 file changed +39
-0
lines changed
Expand file tree Collapse file tree 1 file changed +39
-0
lines changed Original file line number Diff line number Diff line change @@ -434,6 +434,45 @@ func TestGetHealthCheckPort(t *testing.T) {
434434 result : 0 ,
435435 errMessage : "load balancer invalid annotation" ,
436436 },
437+ {
438+ name : "standalone healthCheckNodePort has no effect" ,
439+ svc : & v1.Service {
440+ Spec : v1.ServiceSpec {
441+ HealthCheckNodePort : 65535 ,
442+ Ports : []v1.ServicePort {
443+ {
444+ NodePort : 30080 ,
445+ Port : 80 ,
446+ },
447+ },
448+ },
449+ },
450+ nodePort : 30080 ,
451+ result : 30080 ,
452+ errMessage : "" ,
453+ },
454+ {
455+ name : "healthCheckNodePort with annotation has no effect" ,
456+ svc : & v1.Service {
457+ ObjectMeta : metav1.ObjectMeta {
458+ Annotations : map [string ]string {
459+ "service.beta.kubernetes.io/scw-loadbalancer-health-check-port" : "28390" ,
460+ },
461+ },
462+ Spec : v1.ServiceSpec {
463+ HealthCheckNodePort : 65535 ,
464+ Ports : []v1.ServicePort {
465+ {
466+ NodePort : 30080 ,
467+ Port : 80 ,
468+ },
469+ },
470+ },
471+ },
472+ nodePort : 30080 ,
473+ result : 28390 ,
474+ errMessage : "" ,
475+ },
437476 }
438477
439478 for _ , tc := range testCases {
You can’t perform that action at this time.
0 commit comments