Skip to content

Commit

Permalink
move enabling feature to clusterqueue controller test
Browse files Browse the repository at this point in the history
  • Loading branch information
Anton Stuchinskii committed Sep 20, 2023
1 parent 0284c11 commit c4ae961
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import (
"sigs.k8s.io/controller-runtime/pkg/client"

kueue "sigs.k8s.io/kueue/apis/kueue/v1beta1"
"sigs.k8s.io/kueue/pkg/features"
"sigs.k8s.io/kueue/pkg/metrics"
"sigs.k8s.io/kueue/pkg/util/testing"
"sigs.k8s.io/kueue/pkg/workload"
Expand Down Expand Up @@ -81,6 +82,10 @@ var _ = ginkgo.Describe("ClusterQueue controller", func() {
}
)

ginkgo.BeforeAll(func() {
gomega.Expect(features.SetEnable(features.QueueVisibility, true)).To(gomega.Succeed())
})

ginkgo.BeforeEach(func() {
ns = &corev1.Namespace{
ObjectMeta: metav1.ObjectMeta{
Expand Down Expand Up @@ -676,7 +681,7 @@ var _ = ginkgo.Describe("ClusterQueue controller", func() {
})
})

ginkgo.When("Reconciling clusterQueue pending workload status", func() {
ginkgo.When("Reconciling clusterQueue pending workload status when queue visibility is enabled", ginkgo.Ordered, func() {
var (
clusterQueue *kueue.ClusterQueue
localQueue *kueue.LocalQueue
Expand Down
3 changes: 0 additions & 3 deletions test/integration/controller/core/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ import (
"sigs.k8s.io/kueue/pkg/cache"
"sigs.k8s.io/kueue/pkg/controller/core"
"sigs.k8s.io/kueue/pkg/controller/core/indexer"
"sigs.k8s.io/kueue/pkg/features"
"sigs.k8s.io/kueue/pkg/queue"
"sigs.k8s.io/kueue/pkg/webhooks"
"sigs.k8s.io/kueue/test/integration/framework"
Expand Down Expand Up @@ -85,8 +84,6 @@ func managerSetup(mgr manager.Manager, ctx context.Context) {
cCache := cache.New(mgr.GetClient())
queues := queue.NewManager(mgr.GetClient(), cCache)

gomega.Expect(features.SetEnable(features.QueueVisibility, true)).To(gomega.Succeed())

failedCtrl, err := core.SetupControllers(mgr, queues, cCache, controllersCfg)
gomega.Expect(err).ToNot(gomega.HaveOccurred(), "controller", failedCtrl)
}

0 comments on commit c4ae961

Please sign in to comment.