Skip to content

Commit 1677da2

Browse files
author
Marcell Sevcsik
committed
Minor fixes
1 parent 8128b86 commit 1677da2

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

pkg/gather/clusterconfig/clusterconfig.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ func (i *Gatherer) Gather(ctx context.Context, recorder record.Interface) error
165165
// See: docs/insights-archive-sample/config/pdbs
166166
func GatherPodDisruptionBudgets(i *Gatherer) func() ([]record.Record, []error) {
167167
return func() ([]record.Record, []error) {
168-
pdbs, err := i.policyClient.PodDisruptionBudgets("").List(metav1.ListOptions{Limit: gatherPodDisruptionBudgetLimit,})
168+
pdbs, err := i.policyClient.PodDisruptionBudgets("").List(i.ctx, metav1.ListOptions{Limit: gatherPodDisruptionBudgetLimit,})
169169
if err != nil {
170170
return nil, []error{err}
171171
}

pkg/gather/clusterconfig/clusterconfig_test.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -191,15 +191,15 @@ func TestGatherPodDisruptionBudgets(t *testing.T){
191191
for name, minAvailable := range fakePDBs{
192192
_, err := coreClient.PolicyV1beta1().
193193
PodDisruptionBudgets(fakeNamespace).
194-
Create(&policyv1beta1.PodDisruptionBudget{
194+
Create(context.Background(), &policyv1beta1.PodDisruptionBudget{
195195
ObjectMeta: metav1.ObjectMeta{
196196
Namespace: fakeNamespace,
197197
Name: name,
198198
},
199199
Spec: policyv1beta1.PodDisruptionBudgetSpec{
200200
MinAvailable: &intstr.IntOrString{StrVal: minAvailable},
201201
},
202-
})
202+
}, metav1.CreateOptions{})
203203
if err != nil {
204204
t.Fatalf("unable to create fake pdbs: %v", err)
205205
}

0 commit comments

Comments
 (0)