porting the remaining changes from PR #897

This commit is contained in:
Travis Turner 2017-11-06 14:48:35 -06:00
parent 53fa54d3d3
commit ec5ac629cd
No known key found for this signature in database
GPG key ID: 7F08008DFD9314C9
2 changed files with 11 additions and 11 deletions

View file

@ -305,7 +305,7 @@ func TestExecutor_Execute_SetFieldValue(t *testing.T) {
} else if !exists {
t.Fatal("expected value to exist")
} else if value != 25 {
t.Fatal("unexpected value: %v", value)
t.Fatalf("unexpected value: %v", value)
}
if value, exists, err := f.FieldValue(10, "field1"); err != nil {
@ -313,7 +313,7 @@ func TestExecutor_Execute_SetFieldValue(t *testing.T) {
} else if !exists {
t.Fatal("expected value to exist")
} else if value != 2 {
t.Fatal("unexpected value: %v", value)
t.Fatalf("unexpected value: %v", value)
}
if value, exists, err := f.FieldValue(100, "field0"); err != nil {
@ -321,7 +321,7 @@ func TestExecutor_Execute_SetFieldValue(t *testing.T) {
} else if !exists {
t.Fatal("expected value to exist")
} else if value != 10 {
t.Fatal("unexpected value: %v", value)
t.Fatalf("unexpected value: %v", value)
}
})

View file

@ -956,7 +956,7 @@ func (h *Handler) handleDeleteView(w http.ResponseWriter, r *http.Request) {
// Delete the view.
if err := f.DeleteView(viewName); err != nil {
// Ingore this error becuase views do not exist on all nodes due to slice distribution.
// Ingore this error because views do not exist on all nodes due to slice distribution.
if err != ErrInvalidView {
http.Error(w, err.Error(), http.StatusBadRequest)
return
@ -1201,8 +1201,8 @@ func (h *Handler) handlePostImport(w http.ResponseWriter, r *http.Request) {
// Validate that this handler owns the slice.
if !h.Cluster.OwnsFragment(h.URI, req.Index, req.Slice) {
mesg := fmt.Sprintf("host does not own slice %s-%s slice:%d", h.URI, req.Index, req.Slice)
http.Error(w, mesg, http.StatusPreconditionFailed)
msg := fmt.Sprintf("host does not own slice %s-%s slice:%d", h.URI, req.Index, req.Slice)
http.Error(w, msg, http.StatusPreconditionFailed)
return
}
@ -1271,8 +1271,8 @@ func (h *Handler) handlePostImportValue(w http.ResponseWriter, r *http.Request)
// Validate that this handler owns the slice.
if !h.Cluster.OwnsFragment(h.URI, req.Index, req.Slice) {
mesg := fmt.Sprintf("host does not own slice %s-%s slice:%d", h.URI, req.Index, req.Slice)
http.Error(w, mesg, http.StatusPreconditionFailed)
msg := fmt.Sprintf("host does not own slice %s-%s slice:%d", h.URI, req.Index, req.Slice)
http.Error(w, msg, http.StatusPreconditionFailed)
return
}
@ -1337,8 +1337,8 @@ func (h *Handler) handleGetExportCSV(w http.ResponseWriter, r *http.Request) {
// Validate that this handler owns the slice.
if !h.Cluster.OwnsFragment(h.URI, index, slice) {
mesg := fmt.Sprintf("host does not own slice %s-%s slice:%d", h.URI, index, slice)
http.Error(w, mesg, http.StatusPreconditionFailed)
msg := fmt.Sprintf("host does not own slice %s-%s slice:%d", h.URI, index, slice)
http.Error(w, msg, http.StatusPreconditionFailed)
return
}
@ -1796,7 +1796,7 @@ func (h *Handler) handlePostInputDefinition(w http.ResponseWriter, r *http.Reque
return
}
// Validation the input definition with the curent index's ColumnLabel.
// Validation the input definition with the current index's ColumnLabel.
if err := req.Validate(index.ColumnLabel()); err != nil {
http.Error(w, err.Error(), http.StatusBadRequest)
return