Skip to content

Commit df84f45

Browse files
amisevskAObuchow
authored andcommitted
Fix test code after bumping controller-runtime dependency
Signed-off-by: Angel Misevski <[email protected]>
1 parent 52b39ef commit df84f45

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

pkg/library/flatten/internal/testutil/k8sClient.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ type FakeK8sClient struct {
3232
Errors map[string]TestPluginError
3333
}
3434

35-
func (client *FakeK8sClient) Get(_ context.Context, namespacedName client.ObjectKey, obj client.Object) error {
35+
func (client *FakeK8sClient) Get(_ context.Context, namespacedName client.ObjectKey, obj client.Object, opts ...client.GetOption) error {
3636
template, ok := obj.(*dw.DevWorkspaceTemplate)
3737
if !ok {
3838
return fmt.Errorf("called Get() in fake client with non-DevWorkspaceTemplate")

pkg/library/kubernetes/provision_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import (
2525
"github.com/devfile/devworkspace-operator/pkg/common"
2626
"github.com/devfile/devworkspace-operator/pkg/constants"
2727
"github.com/devfile/devworkspace-operator/pkg/provision/sync"
28-
testlog "github.com/go-logr/logr/testing"
28+
"github.com/go-logr/logr/testr"
2929
"github.com/google/go-cmp/cmp"
3030
"github.com/google/go-cmp/cmp/cmpopts"
3131
"github.com/stretchr/testify/assert"
@@ -99,7 +99,7 @@ func TestHandleKubernetesComponents(t *testing.T) {
9999
api := sync.ClusterAPI{
100100
Client: testClient,
101101
Scheme: testScheme,
102-
Logger: testlog.TestLogger{T: t},
102+
Logger: testr.New(t),
103103
}
104104
wksp := &common.DevWorkspaceWithConfig{
105105
DevWorkspace: testDevWorkspace.DeepCopy(),
@@ -157,7 +157,7 @@ func TestSecretAndConfigMapProvisioning(t *testing.T) {
157157
api := sync.ClusterAPI{
158158
Client: testClient,
159159
Scheme: testScheme,
160-
Logger: testlog.TestLogger{T: t},
160+
Logger: testr.New(t),
161161
}
162162
wksp := &common.DevWorkspaceWithConfig{
163163
DevWorkspace: testDevWorkspace.DeepCopy(),

0 commit comments

Comments
 (0)