Skip to content

Commit

Permalink
Linting
Browse files Browse the repository at this point in the history
Signed-off-by: joshvanl <me@joshvanl.dev>
  • Loading branch information
JoshVanL committed Oct 16, 2024
1 parent 5df95cb commit 28d4927
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion cmd/scheduler/options/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ limitations under the License.
package options

import (
"errors"
"fmt"
"strconv"
"strings"
Expand Down Expand Up @@ -139,7 +140,7 @@ func New(origArgs []string) (*Options, error) {

if fs.Changed("kubeconfig") {
if opts.Mode != string(modes.KubernetesMode) {
return nil, fmt.Errorf("kubeconfig flag is only valid in --mode=kubernetes")
return nil, errors.New("kubeconfig flag is only valid in --mode=kubernetes")
}
opts.KubeConfig = &opts.kubeconfig
}
Expand Down
3 changes: 2 additions & 1 deletion pkg/scheduler/server/internal/controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ package controller

import (
"context"
"errors"
"fmt"
"os"

Expand Down Expand Up @@ -98,7 +99,7 @@ func New(opts Options) (concurrency.Runner, error) {
return fmt.Errorf("unable to get informer: %w", err)
}
if !mgr.GetCache().WaitForCacheSync(ctx) {
return fmt.Errorf("unable to sync cache")
return errors.New("unable to sync cache")
}
hzTarget.Ready()
log.Info("Controller ready")
Expand Down
1 change: 0 additions & 1 deletion pkg/scheduler/server/internal/controller/namespace_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ func Test_Reconcile(t *testing.T) {

req := ctrl.Request{NamespacedName: types.NamespacedName{Name: "test-ns"}}
for name, test := range tests {
test := test
t.Run(name, func(t *testing.T) {
t.Parallel()

Expand Down
2 changes: 1 addition & 1 deletion tests/integration/framework/process/scheduler/scheduler.go
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ func (s *Scheduler) ETCDClient(t *testing.T) *clientv3.Client {
t.Helper()

client, err := clientv3.New(clientv3.Config{
Endpoints: []string{fmt.Sprintf("127.0.0.1:%s", s.EtcdClientPort())},
Endpoints: []string{"127.0.0.1:" + s.EtcdClientPort()},
DialTimeout: 40 * time.Second,
})
require.NoError(t, err)
Expand Down

0 comments on commit 28d4927

Please sign in to comment.