Skip to content

Commit 3ca5ca8

Browse files
committed
feature tests reindexing
1 parent f9eb4e8 commit 3ca5ca8

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
@api @data @api_search @api_search_reindex
2+
Feature: Trigger a reindex via the REST API
3+
In order to have a consistent index when all else fails
4+
As an OpsDev
5+
I want to rebuild the search index via the api
6+
7+
Scenario: Ensure objects are inserted back into the index
8+
Given a 'registration' named 'bobo' exists
9+
And a 'data_bag' named 'users' exists
10+
And a 'data_bag_item' named 'francis' exists
11+
And I wait for '10' seconds
12+
And I dump the contents of the search index
13+
When I 'POST' the 'data_bag' to the path '/search/reindex'
14+
And I wait for '25' seconds
15+
And I dump the contents of the search index
16+
And I 'GET' the path '/search/users?sort=id+desc'
17+
Then the inflated responses key 'rows' item '0' should be a kind of 'Chef::DataBagItem'
18+
And the inflated responses key 'rows' item '0' key 'id' should be 'francis'
19+
20+

0 commit comments

Comments
 (0)