Skip to content

Commit

Permalink
lint
Browse files Browse the repository at this point in the history
  • Loading branch information
ablack12 committed Jun 3, 2024
1 parent 5a879ca commit 716227e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions service/host_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ func TestModifyHostStatusWithUpdateStatus(t *testing.T) {
require.NoError(h.Insert(ctx))
opts := uiParams{Action: "updateStatus", Status: evergreen.HostQuarantined, Notes: "because I can"}

result, httpStatus, err := api.ModifyHostStatus(ctx, env, env.LocalQueue(), &h, opts.Status, opts.Notes, &user)
result, httpStatus, err := api.ModifyHostStatus(ctx, env, &h, opts.Status, opts.Notes, &user)
require.NoError(err)
assert.Equal(http.StatusOK, httpStatus)
assert.Equal(result, fmt.Sprintf(api.HostStatusUpdateSuccess, evergreen.HostRunning, evergreen.HostQuarantined))
Expand All @@ -64,7 +64,7 @@ func TestModifyHostStatusWithUpdateStatus(t *testing.T) {
}
require.NoError(h.Insert(ctx))

_, httpStatus, err := api.ModifyHostStatus(ctx, env, env.LocalQueue(), &h, evergreen.HostRunning, "", &user)
_, httpStatus, err := api.ModifyHostStatus(ctx, env, &h, evergreen.HostRunning, "", &user)
require.NoError(err)
assert.Equal(http.StatusOK, httpStatus)
assert.Equal(h.Status, evergreen.HostProvisioning)
Expand All @@ -80,7 +80,7 @@ func TestModifyHostStatusWithUpdateStatus(t *testing.T) {
h := host.Host{Id: "h3", Status: evergreen.HostRunning, Provider: evergreen.ProviderNameStatic}
opts := uiParams{Action: "updateStatus", Status: evergreen.HostDecommissioned}

_, _, err := api.ModifyHostStatus(ctx, env, env.LocalQueue(), &h, opts.Status, opts.Notes, &user)
_, _, err := api.ModifyHostStatus(ctx, env, &h, opts.Status, opts.Notes, &user)
assert.Error(err)
assert.Contains(err.Error(), api.DecommissionStaticHostError)
})
Expand All @@ -89,7 +89,7 @@ func TestModifyHostStatusWithUpdateStatus(t *testing.T) {
h := host.Host{Id: "h4", Status: evergreen.HostRunning, Provider: evergreen.ProviderNameStatic}
opts := uiParams{Action: "updateStatus", Status: "undefined"}

_, _, err := api.ModifyHostStatus(ctx, env, env.LocalQueue(), &h, opts.Status, opts.Notes, &user)
_, _, err := api.ModifyHostStatus(ctx, env, &h, opts.Status, opts.Notes, &user)
assert.Error(err)
assert.Contains(err.Error(), fmt.Sprintf(api.InvalidStatusError, "undefined"))
})
Expand Down

0 comments on commit 716227e

Please sign in to comment.