Skip to content

Commit

Permalink
fix function name typo
Browse files Browse the repository at this point in the history
  • Loading branch information
lucafrancescato committed Jan 25, 2022
1 parent a9d500c commit cfee0b9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions pkg/utils/restcfg/ratelimiting.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ func InitFlags(flagset *flag.FlagSet) {
// SetRateLimiter configures the rate limiting parameters of the given rest configuration
// to the values obtained from the command line parameters.
func SetRateLimiter(cfg *rest.Config) *rest.Config {
return SetRateLimiterWithCustomParamenters(cfg, float32(qps), int(burst))
return SetRateLimiterWithCustomParameters(cfg, float32(qps), int(burst))
}

// SetRateLimiterWithCustomParamenters configures the rate limiting parameters of the given rest configuration.
func SetRateLimiterWithCustomParamenters(cfg *rest.Config, qps float32, burst int) *rest.Config {
// SetRateLimiterWithCustomParameters configures the rate limiting parameters of the given rest configuration.
func SetRateLimiterWithCustomParameters(cfg *rest.Config, qps float32, burst int) *rest.Config {
cfg.QPS = qps
cfg.Burst = burst
return cfg
Expand Down
4 changes: 2 additions & 2 deletions pkg/utils/restcfg/ratelimiting_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,9 @@ var _ = Describe("The rate limiting utility functions", func() {
})
})

Describe("the SetRateLimiterWithCustomParamenters function", func() {
Describe("the SetRateLimiterWithCustomParameters function", func() {
Context("configuring the rate limiting parameters", func() {
JustBeforeEach(func() { output = restcfg.SetRateLimiterWithCustomParamenters(&cfg, qps, burst) })
JustBeforeEach(func() { output = restcfg.SetRateLimiterWithCustomParameters(&cfg, qps, burst) })

It("should return a pointer to the original object", func() { Expect(output).To(BeIdenticalTo(&cfg)) })
It("should set the desired QPS value", func() { Expect(cfg.QPS).To(BeNumerically("==", qps)) })
Expand Down

0 comments on commit cfee0b9

Please sign in to comment.