Skip to content

Commit

Permalink
fix: add missing parameter for upsert jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
Juanadelacuesta committed Apr 12, 2023
1 parent f6e1ecd commit 25e4c7c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions nomad/deployment_endpoint_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -982,7 +982,7 @@ func TestDeploymentEndpoint_List(t *testing.T) {
d.JobID = j.ID
state := s1.fsm.State()

must.Nil(t, state.UpsertJob(structs.MsgTypeTestSetup, 999, j), must.Sprint("UpsertJob"))
must.Nil(t, state.UpsertJob(structs.MsgTypeTestSetup, 999, nil, j), must.Sprint("UpsertJob"))
must.Nil(t, state.UpsertDeployment(1000, d), must.Sprint("UpsertDeployment"))

// Lookup the deployments
Expand Down Expand Up @@ -1020,7 +1020,7 @@ func TestDeploymentEndpoint_List(t *testing.T) {
d2.Namespace = "prod"
d2.JobID = j2.ID
must.Nil(t, state.UpsertNamespaces(1001, []*structs.Namespace{{Name: "prod"}}))
must.Nil(t, state.UpsertJob(structs.MsgTypeTestSetup, 1002, j2), must.Sprint("UpsertJob"))
must.Nil(t, state.UpsertJob(structs.MsgTypeTestSetup, 1002, nil, j2), must.Sprint("UpsertJob"))
must.Nil(t, state.UpsertDeployment(1003, d2), must.Sprint("UpsertDeployment"))

// Lookup the deployments with wildcard namespace
Expand Down Expand Up @@ -1276,7 +1276,7 @@ func TestDeploymentEndpoint_List_Blocking(t *testing.T) {
d := mock.Deployment()
d.JobID = j.ID

must.Nil(t, state.UpsertJob(structs.MsgTypeTestSetup, 999, j), must.Sprint("UpsertJob"))
must.Nil(t, state.UpsertJob(structs.MsgTypeTestSetup, 999, nil, j), must.Sprint("UpsertJob"))

// Upsert alloc triggers watches
time.AfterFunc(100*time.Millisecond, func() {
Expand Down

0 comments on commit 25e4c7c

Please sign in to comment.