Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
machine424 committed Apr 25, 2024
1 parent 4d48684 commit 5fed856
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions pkg/monitortests/monitoring/disruptionmetricsapi/monitortest.go
Expand Up @@ -11,7 +11,7 @@ import (
appsv1 "k8s.io/api/apps/v1"
apierrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/labels"
// "k8s.io/apimachinery/pkg/labels"
"k8s.io/client-go/kubernetes"
"k8s.io/client-go/rest"

Expand Down Expand Up @@ -70,16 +70,18 @@ func (w *availability) StartCollection(ctx context.Context, adminRESTConfig *res
}

disruptionBackedName := "metrics-api"
newConnectionTestName := "[sig-instrumentation] disruption/metrics-api connection/new should be available throughout the test"
reusedConnectionTestName := "[sig-instrumentation] disruption/metrics-api connection/reused should be available throughout the test"
newConnectionTestName := fmt.Sprintf("[sig-instrumentation] disruption/%s connection/new should be available throughout the test", disruptionBackedName)
reusedConnectionTestName := fmt.Sprintf("[sig-instrumentation] disruption/%s connection/reused should be available throughout the test", disruptionBackedName)

// Ask for the metrics of the API backend Pods.
u, err := url.Parse(fmt.Sprintf("/apis/metrics.k8s.io/v1beta1/namespaces/%s/pods", monitoringNamespace))
if err != nil {
return err
}
params := url.Values{
"labelSelector": {labels.Set(deployment.Spec.Selector.MatchLabels).String()},
// TODO test
"labelSelector": {"doesnt=exist"},
// "labelSelector": {labels.Set(deployment.Spec.Selector.MatchLabels).String()},
// only interested in the availability.
"limit": {"1"},
}
Expand Down

0 comments on commit 5fed856

Please sign in to comment.