Skip to content

Commit

Permalink
Mark BlocksDeleted as deprecated
Browse files Browse the repository at this point in the history
  • Loading branch information
bahlo authored and lukasmalkmus committed Sep 23, 2022
1 parent fb506dc commit 643f6e2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion axiom/datasets.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ type Dataset struct {
// TrimResult is the result of a trim operation.
type TrimResult struct {
// BlocksDeleted is the amount of blocks deleted by the trim operation.
BlocksDeleted int `json:"numDeleted"`
BlocksDeleted int `json:"numDeleted"` // Deprecated: BlocksDeleted is deprecated and will be removed in the future.
}

// IngestStatus is the status after an event ingestion operation.
Expand Down
4 changes: 2 additions & 2 deletions axiom/datasets_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -348,15 +348,15 @@ func TestDatasetsService_Delete(t *testing.T) {

func TestDatasetsService_Trim(t *testing.T) {
exp := &TrimResult{
BlocksDeleted: 1,
BlocksDeleted: 0,
}

hf := func(w http.ResponseWriter, r *http.Request) {
assert.Equal(t, http.MethodPost, r.Method)

w.Header().Set("Content-Type", mediaTypeJSON)
_, err := fmt.Fprint(w, `{
"numDeleted": 1
"numDeleted": 0
}`)
assert.NoError(t, err)
}
Expand Down

0 comments on commit 643f6e2

Please sign in to comment.