Skip to content

Commit 6ef2f3e

Browse files
mrajagopalCopilot
andauthored
Update pkg/jobs/nic_job_list_test.go
Removed custom fake types; use fake.NewSimpleClientset instead Co-authored-by: Copilot <[email protected]>
1 parent 6d7b09d commit 6ef2f3e

File tree

1 file changed

+1
-17
lines changed

1 file changed

+1
-17
lines changed

pkg/jobs/nic_job_list_test.go

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -27,23 +27,7 @@ func mockQueryCRD(crd crds.Crd, namespace string, ctx context.Context) ([]byte,
2727
return json.Marshal(map[string]string{"kind": crd.Resource})
2828
}
2929

30-
// Mock K8sCoreClientSet to return fake pods
31-
type FakePodInterface struct {
32-
ListFunc func(ctx context.Context, opts metav1.ListOptions) (*corev1.PodList, error)
33-
}
34-
35-
func (f *FakePodInterface) List(ctx context.Context, opts metav1.ListOptions) (*corev1.PodList, error) {
36-
return f.ListFunc(ctx, opts)
37-
}
38-
39-
type FakeCoreClientSet struct {
40-
PodsFunc func(namespace string) *FakePodInterface
41-
}
42-
43-
func (f *FakeCoreClientSet) Pods(namespace string) *FakePodInterface {
44-
return f.PodsFunc(namespace)
45-
}
46-
30+
// (Removed custom fake types; use fake.NewSimpleClientset instead)
4731
func TestNICJobList_ExecJobs(t *testing.T) {
4832
tmpDir := t.TempDir()
4933
dc := &data_collector.DataCollector{

0 commit comments

Comments
 (0)