Skip to content

Commit

Permalink
Should remove and restore labeller only from workers
Browse files Browse the repository at this point in the history
Currently in some tests we are waiting for
the node labeller to be resumed in any nodes
including unschedulable nodes and that will not work
because master shouldn't be labeled by node
labeller.

Signed-off-by: bmordeha <bmodeha@redhat.com>
  • Loading branch information
bmordeha committed Feb 22, 2023
1 parent 18f8d81 commit a3ca688
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions tests/hyperv_test.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package tests_test

import (
"context"
"fmt"
"strings"
"time"
Expand Down Expand Up @@ -125,21 +124,15 @@ var _ = Describe("[Serial][sig-compute] Hyper-V enlightenments", func() {

BeforeEach(func() {
if isTSCFrequencyExposed(virtClient) {
nodeList, err := virtClient.CoreV1().Nodes().List(context.Background(), metav1.ListOptions{})
Expect(err).ToNot(HaveOccurred())

for _, node := range nodeList.Items {
for _, node := range libnode.GetAllSchedulableNodes(virtClient).Items {
stopNodeLabeller(node.Name, virtClient)
removeTSCFrequencyFromNode(node)
}
}
})

AfterEach(func() {
nodeList, err := virtClient.CoreV1().Nodes().List(context.Background(), metav1.ListOptions{})
Expect(err).ToNot(HaveOccurred())

for _, node := range nodeList.Items {
for _, node := range libnode.GetAllSchedulableNodes(virtClient).Items {
_ = resumeNodeLabeller(node.Name, virtClient)
}
})
Expand Down

0 comments on commit a3ca688

Please sign in to comment.