Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
rbaturov committed Dec 23, 2024
1 parent 661bc49 commit da8b541
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions test/e2e/serial/tests/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@ var _ = Describe("metrics exposed securely", Serial, func() {

Context("testing metrics e2e from rte worker pod", func() {
metricsPort := "2112"
labelSelector := "name=resource-topology"
pods, err := e2eclient.K8sClient.CoreV1().Pods(namespace).List(context.TODO(), metav1.ListOptions{
LabelSelector: labelSelector,
})
Expect(err).To(BeNil(), "Error listing worker pods: %v", err)
Expect(len(pods.Items)).To(BeNumerically(">=", 1), "There should be at least one worker pod")
workerPod := &pods.Items[0]

It("should be able to fetch metrics from the worker pod container using kube-rbac-proxy", func() {
labelSelector := "name=resource-topology"
pods, err := e2eclient.K8sClient.CoreV1().Pods(namespace).List(context.TODO(), metav1.ListOptions{
LabelSelector: labelSelector,
})
Expect(err).To(BeNil(), "Error listing worker pods: %v", err)
Expect(len(pods.Items)).To(BeNumerically(">=", 1), "There should be at least one worker pod")
workerPod := &pods.Items[0]
stdout := fetchMetricsFromPod(workerPod, metricsAddress, metricsPort)
Expect(strings.Contains(stdout, "rte_noderesourcetopology_writes_total")).To(BeTrue(), "rte_noderesourcetopology_writes_total metric not found")
Expect(strings.Contains(stdout, "rte_wakeup_delay_milliseconds")).To(BeTrue(), "rte_wakeup_delay_milliseconds metric not found")
Expand Down

0 comments on commit da8b541

Please sign in to comment.