Skip to content

Commit

Permalink
Check the ns existence before attempting to create it.
Browse files Browse the repository at this point in the history
  • Loading branch information
trasc committed Sep 26, 2024
1 parent d7bd54c commit 8f5bdba
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions test/integration/multikueue/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,13 @@ func managerAndMultiKueueSetup(ctx context.Context, mgr manager.Manager, gcInter
Name: "kueue-system",
},
}
gomega.Expect(client.IgnoreAlreadyExists(mgr.GetClient().Create(ctx, managersConfigNamespace))).To(gomega.Succeed())
err := mgr.GetAPIReader().Get(ctx, client.ObjectKeyFromObject(managersConfigNamespace), managersConfigNamespace)
gomega.Expect(client.IgnoreNotFound(err)).To(gomega.Succeed())
if err != nil {
gomega.Expect(client.IgnoreAlreadyExists(mgr.GetClient().Create(ctx, managersConfigNamespace))).To(gomega.Succeed())
}

err := multikueue.SetupIndexer(ctx, mgr.GetFieldIndexer(), managersConfigNamespace.Name)
err = multikueue.SetupIndexer(ctx, mgr.GetFieldIndexer(), managersConfigNamespace.Name)
gomega.Expect(err).NotTo(gomega.HaveOccurred())

err = multikueue.SetupControllers(mgr, managersConfigNamespace.Name,
Expand Down

0 comments on commit 8f5bdba

Please sign in to comment.