@@ -1193,6 +1193,15 @@ func TestGetHTTPHealthCheck(t *testing.T) {
11931193 },
11941194 }, & scwlb.HealthCheckHTTPConfig {URI : "/path" , Method : "GET" , Code : scw .Int32Ptr (200 ), HostHeader : "domain.tld" }},
11951195
1196+ {"with a domain, path and query params" , & v1.Service {
1197+ ObjectMeta : metav1.ObjectMeta {
1198+ Annotations : map [string ]string {
1199+ "service.beta.kubernetes.io/scw-loadbalancer-health-check-type" : "http" ,
1200+ "service.beta.kubernetes.io/scw-loadbalancer-health-check-http-uri" : "domain.tld/path?password=xxxx" ,
1201+ },
1202+ },
1203+ }, & scwlb.HealthCheckHTTPConfig {URI : "/path?password=xxxx" , Method : "GET" , Code : scw .Int32Ptr (200 ), HostHeader : "domain.tld" }},
1204+
11961205 {"with just a path" , & v1.Service {
11971206 ObjectMeta : metav1.ObjectMeta {
11981207 Annotations : map [string ]string {
@@ -1225,7 +1234,7 @@ func TestGetHTTPHealthCheck(t *testing.T) {
12251234 t .Run (tt .name , func (t * testing.T ) {
12261235 got , _ := getHTTPHealthCheck (tt .svc , int32 (80 ))
12271236 if ! reflect .DeepEqual (got , tt .want ) {
1228- t .Errorf ("want: %v, got: %v" , got , tt .want )
1237+ t .Errorf ("want: %v, got: %v" , tt .want , got )
12291238 }
12301239 })
12311240 }
0 commit comments