internal/scheduler/job: fix test failure (#5472)

This was failing because the compared values weren't
pointers. It was probably caused by a depedency version
update changing the behavior of this function.
pull/5475/head
Johan Brandhorst-Satzkorn 1 year ago committed by GitHub
parent 7c4451dc73
commit 936d320ca6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -35,7 +35,7 @@ func TestRepository_UpsertJob(t *testing.T) {
} }
tests := []struct { tests := []struct {
name string name string
in args in *args
want *Job want *Job
wantErr bool wantErr bool
wantErrCode errors.Code wantErrCode errors.Code
@ -44,7 +44,7 @@ func TestRepository_UpsertJob(t *testing.T) {
{ {
name: "missing-name", name: "missing-name",
wantErr: true, wantErr: true,
in: args{ in: &args{
description: "description", description: "description",
}, },
wantErrCode: errors.InvalidParameter, wantErrCode: errors.InvalidParameter,
@ -52,7 +52,7 @@ func TestRepository_UpsertJob(t *testing.T) {
}, },
{ {
name: "missing-description", name: "missing-description",
in: args{ in: &args{
name: "name", name: "name",
}, },
wantErr: true, wantErr: true,
@ -61,7 +61,7 @@ func TestRepository_UpsertJob(t *testing.T) {
}, },
{ {
name: "valid", name: "valid",
in: args{ in: &args{
name: "name", name: "name",
description: "description", description: "description",
}, },

Loading…
Cancel
Save