Skip to content

Commit

Permalink
fix lint, replace deprecated functions
Browse files Browse the repository at this point in the history
  • Loading branch information
ranakan19 committed Oct 9, 2024
1 parent dc1faa0 commit dea8ed2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ func newCachedClient(ctx context.Context, cfg *rest.Config) (client.Client, erro
hostCluster, err := runtimecluster.New(cfg, func(options *runtimecluster.Options) {
options.Scheme = scheme
// cache only in the host-operator namespace
options.Namespace = configuration.Namespace()
options.Cache.Namespaces = []string{configuration.Namespace()}
})
if err != nil {
return nil, err
Expand Down
3 changes: 2 additions & 1 deletion pkg/server/server_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package server_test

import (
"context"
"io"
"net/http"
"testing"
Expand Down Expand Up @@ -63,7 +64,7 @@ func (s *TestServerSuite) TestServer() {
assert.NoError(t, err) // require must only be used in the goroutine running the test function (testifylint)
}(t)

err := wait.Poll(DefaultRetryInterval, DefaultTimeout, func() (done bool, err error) {
err := wait.PollUntilContextTimeout(context.TODO(), DefaultRetryInterval, DefaultTimeout, false, func(context.Context) (done bool, err error) {
req, err := http.NewRequest("GET", "http://localhost:8080/api/v1/health", nil)
if err != nil {
return false, err
Expand Down

0 comments on commit dea8ed2

Please sign in to comment.