mirror of
https://github.com/kubernetes/kubernetes.git
synced 2026-02-03 20:40:26 -05:00
Merge bb26c65e87 into 44ff6085cd
This commit is contained in:
commit
8611b53e92
4 changed files with 7 additions and 7 deletions
|
|
@ -38,7 +38,7 @@ func TestRunCordonOrUncordon(t *testing.T) {
|
|||
{
|
||||
description: "nil context object",
|
||||
drainer: &Helper{
|
||||
Client: fake.NewSimpleClientset(),
|
||||
Client: fake.NewClientset(),
|
||||
},
|
||||
desired: true,
|
||||
expectedError: &nilContextError,
|
||||
|
|
|
|||
|
|
@ -293,7 +293,7 @@ func TestCheckEvictionSupport(t *testing.T) {
|
|||
for _, evictionVersion := range []string{"", "v1", "v1beta1"} {
|
||||
t.Run(fmt.Sprintf("evictionVersion=%v", evictionVersion),
|
||||
func(t *testing.T) {
|
||||
k := fake.NewSimpleClientset()
|
||||
k := fake.NewClientset()
|
||||
if len(evictionVersion) > 0 {
|
||||
addEvictionSupport(t, k, evictionVersion)
|
||||
} else {
|
||||
|
|
@ -411,7 +411,7 @@ func TestDeleteOrEvict(t *testing.T) {
|
|||
}
|
||||
|
||||
// Build the fake client
|
||||
k := fake.NewSimpleClientset(create...)
|
||||
k := fake.NewClientset(create...)
|
||||
if tc.evictionSupported {
|
||||
addEvictionSupport(t, k, "v1")
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ func TestGetPodList(t *testing.T) {
|
|||
|
||||
for i := range tests {
|
||||
test := tests[i]
|
||||
fake := fakeexternal.NewSimpleClientset(test.podList)
|
||||
fake := fakeexternal.NewClientset(test.podList)
|
||||
if len(test.watching) > 0 {
|
||||
watcher := watch.NewFake()
|
||||
for _, event := range test.watching {
|
||||
|
|
@ -254,7 +254,7 @@ func TestGetFirstPod(t *testing.T) {
|
|||
|
||||
for i := range tests {
|
||||
test := tests[i]
|
||||
fake := fakeexternal.NewSimpleClientset(test.podList)
|
||||
fake := fakeexternal.NewClientset(test.podList)
|
||||
if len(test.watching) > 0 {
|
||||
watcher := watch.NewFake()
|
||||
for _, event := range test.watching {
|
||||
|
|
|
|||
|
|
@ -387,7 +387,7 @@ func TestLogsForObject(t *testing.T) {
|
|||
}
|
||||
|
||||
for _, test := range tests {
|
||||
fakeClientset := fakeexternal.NewSimpleClientset(test.clientsetPods...)
|
||||
fakeClientset := fakeexternal.NewClientset(test.clientsetPods...)
|
||||
responses, err := logsForObjectWithClient(fakeClientset.CoreV1(), test.obj, test.opts, 20*time.Second, test.allContainers, test.allPods)
|
||||
if test.expectedErr == "" && err != nil {
|
||||
t.Errorf("%s: unexpected error: %v", test.name, err)
|
||||
|
|
@ -565,7 +565,7 @@ func TestLogsForObjectWithClient(t *testing.T) {
|
|||
for _, tc := range cases {
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
pod := tc.podFn()
|
||||
fakeClientset := fakeexternal.NewSimpleClientset(pod)
|
||||
fakeClientset := fakeexternal.NewClientset(pod)
|
||||
responses, err := logsForObjectWithClient(fakeClientset.CoreV1(), pod, tc.podLogOptions, 20*time.Second, tc.allContainers, tc.allPods)
|
||||
if err != nil {
|
||||
if len(tc.expectedError) > 0 {
|
||||
|
|
|
|||
Loading…
Reference in a new issue