Skip to content

Commit 9144bb5

Browse files
committed
Fix test
1 parent 9358443 commit 9144bb5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pkg/workceptor/kubernetes_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ package workceptor_test
22

33
import (
44
"context"
5-
"fmt"
65
"io"
76
"net/http"
87
"os"
@@ -486,13 +485,14 @@ func TestKubeLoggingWithReconnect(t *testing.T) {
486485
return resp, nil
487486
}),
488487
NegotiatedSerializer: scheme.Codecs.WithoutConversion(),
489-
GroupVersion: pod.GroupVersionKind().GroupVersion(),
490-
VersionedAPIPath: fmt.Sprintf("/api/v1/namespaces/%s/pods/%s/log", pod.Namespace, pod.Name),
491488
}
492489
mockKubeAPI.EXPECT().GetLogs(gomock.Any(), gomock.Any(), gomock.Any(), gomock.Any()).Return(req.Request()).AnyTimes()
493490
mockBaseWorkUnitForWorkUnit.EXPECT().GetWorkceptor().Return(w).AnyTimes()
494491
logger := logger.NewReceptorLogger("")
495492
mockNetceptor.EXPECT().GetLogger().Return(logger).AnyTimes()
493+
mockKubeAPI.EXPECT().SubResource(gomock.Any(), gomock.Any(), gomock.Any()).Return(req.Request()).AnyTimes()
494+
exec := ex{}
495+
mockKubeAPI.EXPECT().NewSPDYExecutor(gomock.Any(), gomock.Any(), gomock.Any()).Return(&exec, nil).AnyTimes()
496496
},
497497
},
498498
}

0 commit comments

Comments
 (0)