Skip to content

Commit

Permalink
[YUNIKORN-2714] Added E2E test to verify queue name with special char…
Browse files Browse the repository at this point in the history
…acters
  • Loading branch information
rrajesh-cloudera committed Sep 3, 2024
1 parent f8e9c11 commit fe7b6e8
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions test/e2e/user_group_limit/user_group_limit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -641,6 +641,32 @@ var _ = ginkgo.Describe("UserGroupLimit", func() {
checkUsage(groupTestType, url.QueryEscape(validGroup), sandboxQueue1, []*v1.Pod{usergroup1Sandbox1Pod1})
})

ginkgo.It("Verify_Queue_Name_With_Special_Characters", func() {
ginkgo.By("Create a queue with a name that includes all allowed special characters")
queueName := "queue-#_@/:"

yunikorn.UpdateCustomConfigMapWrapper(oldConfigMap, "", func(sc *configs.SchedulerConfig) error {
// remove placement rules so we can control queue
sc.Partitions[0].PlacementRules = nil

var err error
if err = common.AddQueue(sc, "default", "root", configs.QueueConfig{
Name: queueName,
Resources: configs.Resources{Guaranteed: map[string]string{"memory": fmt.Sprintf("%dM", 200)}},
Properties: map[string]string{"preemption.delay": "1s"},
}); err != nil {
return err
}
return nil
})

ginkgo.By("Fetch the queue information using the REST API")
allQueues, err := restClient.GetQueues("default")
gomega.Ω(err).NotTo(gomega.HaveOccurred())
ginkgo.By("Verify that the queue information is returned correctly")
gomega.Ω(allQueues.Children[0].QueueName).To(gomega.Equal("root." + queueName))
})

ginkgo.AfterEach(func() {
tests.DumpClusterInfoIfSpecFailed(suiteName, []string{ns.Name})

Expand Down

0 comments on commit fe7b6e8

Please sign in to comment.