diff --git a/test/e2e/user_group_limit/user_group_limit_test.go b/test/e2e/user_group_limit/user_group_limit_test.go index 7eaef2211..0e39264d8 100644 --- a/test/e2e/user_group_limit/user_group_limit_test.go +++ b/test/e2e/user_group_limit/user_group_limit_test.go @@ -1104,6 +1104,12 @@ var _ = ginkgo.Describe("UserGroupLimit", func() { gomega.Ω(err).NotTo(HaveOccurred()) err = kClient.DeleteClusterRoleBindings("pod-creator-role-binding") gomega.Ω(err).NotTo(HaveOccurred()) + // update the kubeconfig with oldkubeconfig + ginkgo.By("Restoring Kubeconfig...") + if oldKubeconfigContent != nil { + err := os.WriteFile(oldKubeconfigPath, oldKubeconfigContent, 0600) + gomega.Ω(err).NotTo(HaveOccurred()) + } queueName2 := "root_22" yunikorn.UpdateCustomConfigMapWrapper(oldConfigMap, "", func(sc *configs.SchedulerConfig) error { // remove placement rules so we can control queue