Skip to content

Commit

Permalink
Added test for if_seq_no and if_primary_term
Browse files Browse the repository at this point in the history
Signed-off-by: Kyle Darryl Aguilar <aguilarkyledarryl@gmail.com>
  • Loading branch information
noname4life committed Oct 5, 2022
1 parent 89c1e2a commit f1d5553
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion opensearchutil/bulk_indexer_internal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,18 @@ func TestBulkIndexer(t *testing.T) {
`{"index":{"_index":"test","_id":"42"}}` + "\n",
},
{
"with version and no document",
"with if_seq_no and if_primary_term",
args{BulkIndexerItem{
Action: "index",
DocumentID: "42",
Index: "test",
IfSeqNum: int64Pointer(5),
IfPrimaryTerm: int64Pointer(1),
}},
`{"index":{"_index":"test","_id":"42","if_seq_no":5,"if_primary_term":1}}` + "\n",
},
{
"with version and no document, if_seq_no, and if_primary_term",
args{BulkIndexerItem{
Action: "index",
Index: "test",
Expand Down

0 comments on commit f1d5553

Please sign in to comment.