lib/promscrape/discovery/kubernetes: fix tests after e154f4a644

This commit is contained in:
Aliaksandr Valialkin 2021-03-03 22:41:15 +02:00
parent d109e17f46
commit bae7a1b47a

View file

@ -137,7 +137,7 @@ func TestGetAPIPaths(t *testing.T) {
}) })
// role=ingress // role=ingress
f("ingress", nil, nil, []string{"/api/v1/ingresses"}) f("ingress", nil, nil, []string{"/apis/networking.k8s.io/v1beta1/ingresses"})
f("ingress", []string{"x", "y"}, []Selector{ f("ingress", []string{"x", "y"}, []Selector{
{ {
Role: "node", Role: "node",
@ -156,7 +156,7 @@ func TestGetAPIPaths(t *testing.T) {
Label: "baaa", Label: "baaa",
}, },
}, []string{ }, []string{
"/api/v1/namespaces/x/ingresses?labelSelector=cde%2Cbaaa&fieldSelector=abc", "/apis/networking.k8s.io/v1beta1/namespaces/x/ingresses?labelSelector=cde%2Cbaaa&fieldSelector=abc",
"/api/v1/namespaces/y/ingresses?labelSelector=cde%2Cbaaa&fieldSelector=abc", "/apis/networking.k8s.io/v1beta1/namespaces/y/ingresses?labelSelector=cde%2Cbaaa&fieldSelector=abc",
}) })
} }