Skip to content

Commit

Permalink
chore: remove ctx args in tt
Browse files Browse the repository at this point in the history
  • Loading branch information
Kavinraja-G committed May 27, 2024
1 parent 0c51c34 commit 5ec4972
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions cmd/kueuectl/app/list/list_pods_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ func TestPodOptions_getJobControllerUID(t *testing.T) {
IOStreams genericiooptions.IOStreams
}
type args struct {
ctx context.Context
jobName string
}
tests := []struct {
Expand All @@ -74,7 +73,6 @@ func TestPodOptions_getJobControllerUID(t *testing.T) {
},
},
args: args{
ctx: context.TODO(),
jobName: "test-job",
},
fields: fields{
Expand All @@ -97,7 +95,6 @@ func TestPodOptions_getJobControllerUID(t *testing.T) {
Namespace: "default",
},
args: args{
ctx: context.TODO(),
jobName: "missing-uid-job",
},
want: "",
Expand All @@ -117,7 +114,6 @@ func TestPodOptions_getJobControllerUID(t *testing.T) {
Namespace: "default",
},
args: args{
ctx: context.TODO(),
jobName: "test-job",
},
want: "",
Expand All @@ -139,7 +135,7 @@ func TestPodOptions_getJobControllerUID(t *testing.T) {
PrintObj: tt.fields.PrintObj,
IOStreams: tt.fields.IOStreams,
}
got, err := o.getJobControllerUID(tt.args.ctx, tt.args.jobName)
got, err := o.getJobControllerUID(context.TODO(), tt.args.jobName)
if (err != nil) != tt.wantErr {
t.Errorf("getJobControllerUID() error = %v, wantErr %v", err, tt.wantErr)
return
Expand All @@ -163,7 +159,6 @@ func TestPodOptions_listPodsByControllerUID(t *testing.T) {
JobArg string
}
type args struct {
ctx context.Context
controllerUID string
}
tests := []struct {
Expand Down Expand Up @@ -225,7 +220,6 @@ func TestPodOptions_listPodsByControllerUID(t *testing.T) {
Namespace: "default",
},
args: args{
ctx: context.TODO(),
controllerUID: "valid-controller-uid",
},
wantOut: []string{
Expand Down Expand Up @@ -257,7 +251,6 @@ func TestPodOptions_listPodsByControllerUID(t *testing.T) {
Namespace: "default",
},
args: args{
ctx: context.TODO(),
controllerUID: "invalid-controller-uid",
},
wantOut: []string{""},
Expand All @@ -280,7 +273,7 @@ func TestPodOptions_listPodsByControllerUID(t *testing.T) {
IOStreams: s,
}

gotErr := o.listPodsByControllerUID(tt.args.ctx, tt.args.controllerUID)
gotErr := o.listPodsByControllerUID(context.TODO(), tt.args.controllerUID)
if diff := cmp.Diff(tt.wantErr, gotErr, cmpopts.EquateErrors()); diff != "" {
t.Errorf("Unexpected error (-want/+got)\n%s", diff)
}
Expand Down

0 comments on commit 5ec4972

Please sign in to comment.