blob: f2c9c5194d1901057d4a589adf7e40d1e190ba79 [file] [log] [blame]
package maps_test
import (
. "github.com/onsi/ginkgo/v2"
. "github.com/onsi/gomega"
)
import (
"github.com/apache/dubbo-kubernetes/pkg/util/maps"
)
var _ = Describe("SortedKeys", func() {
It("should return sorted keys", func() {
// given
m := map[string]string{
"c": "x",
"b": "y",
"a": "z",
}
// when
keys := maps.SortedKeys(m)
// then
Expect(keys).To(Equal([]string{"a", "b", "c"}))
})
})