Guest User

Untitled

a guest
Apr 25th, 2018
97
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 16.89 KB | None | 0 0
  1. @api @data @api_search @api_search_show
  2. Feature: Search data via the REST API
  3. In order to know about objects in the system
  4. As a Developer
  5. I want to search the objects
  6.  
  7. Scenario: Search for objects when none have been created # features/api/search/show_search.feature:7
  8. Given a 'registration' named 'bobo' exists # features/steps/fixture_steps.rb:162
  9. And a 'data_bag' named 'users' exists # features/steps/fixture_steps.rb:162
  10. When I authenticate as 'bobo' # features/steps/request_steps.rb:53
  11. And I 'GET' the path '/search/users' # features/steps/request_steps.rb:1
  12. Then the inflated responses key 'rows' should be '0' items long # features/steps/response_steps.rb:48
  13. And the inflated responses key 'start' should be the integer '0' # features/steps/response_steps.rb:9
  14. And the inflated responses key 'total' should be the integer '0' # features/steps/response_steps.rb:9
  15.  
  16. Scenario: Search for objects when one has been created # features/api/search/show_search.feature:16
  17. Given a 'registration' named 'bobo' exists # features/steps/fixture_steps.rb:162
  18. And a 'data_bag' named 'users' exists # features/steps/fixture_steps.rb:162
  19. And a 'data_bag_item' named 'francis' exists # features/steps/fixture_steps.rb:162
  20. And I wait for '10' seconds # features/steps/fixture_steps.rb:212
  21. When I authenticate as 'bobo' # features/steps/request_steps.rb:53
  22. And I 'GET' the path '/search/users' # features/steps/request_steps.rb:1
  23. /usr/local/lib/ruby/gems/1.8/gems/rspec-1.2.9/lib/spec/matchers/matcher.rb:17: warning: multiple values for a block parameter (0 for 1)
  24. from /usr/local/lib/ruby/gems/1.8/gems/rspec-1.2.9/lib/spec/matchers/matcher.rb:74
  25. Then the inflated responses key 'rows' item '0' should be a kind of 'Chef::DataBagItem' # features/steps/response_steps.rb:40
  26. expected nil to be a kind of Chef::DataBagItem (Spec::Expectations::ExpectationNotMetError)
  27. ./features/steps/response_steps.rb:41:in `/^the inflated responses key '(.+)' item '(\d+)' should be a kind of '(.+)'$/'
  28. features/api/search/show_search.feature:23:in `Then the inflated responses key 'rows' item '0' should be a kind of 'Chef::DataBagItem''
  29. And the inflated responses key 'rows' item '0' key 'id' should be 'francis' # features/steps/response_steps.rb:44
  30. And the inflated responses key 'start' should be the integer '0' # features/steps/response_steps.rb:9
  31. And the inflated responses key 'total' should be the integer '1' # features/steps/response_steps.rb:9
  32.  
  33. Scenario: Search for objects when two have been created # features/api/search/show_search.feature:28
  34. Given a 'registration' named 'bobo' exists # features/steps/fixture_steps.rb:162
  35. And a 'data_bag' named 'users' exists # features/steps/fixture_steps.rb:162
  36. And a 'data_bag_item' named 'francis' exists # features/steps/fixture_steps.rb:162
  37. And a 'data_bag_item' named 'axl_rose' exists # features/steps/fixture_steps.rb:162
  38. And I wait for '10' seconds # features/steps/fixture_steps.rb:212
  39. When I authenticate as 'bobo' # features/steps/request_steps.rb:53
  40. And I 'GET' the path '/search/users' # features/steps/request_steps.rb:1
  41. /usr/local/lib/ruby/gems/1.8/gems/rspec-1.2.9/lib/spec/matchers/matcher.rb:17: warning: multiple values for a block parameter (0 for 1)
  42. from /usr/local/lib/ruby/gems/1.8/gems/rspec-1.2.9/lib/spec/matchers/matcher.rb:74
  43. Then the inflated responses key 'rows' item '0' should be a kind of 'Chef::DataBagItem' # features/steps/response_steps.rb:40
  44. expected nil to be a kind of Chef::DataBagItem (Spec::Expectations::ExpectationNotMetError)
  45. ./features/steps/response_steps.rb:41:in `/^the inflated responses key '(.+)' item '(\d+)' should be a kind of '(.+)'$/'
  46. features/api/search/show_search.feature:36:in `Then the inflated responses key 'rows' item '0' should be a kind of 'Chef::DataBagItem''
  47. And the inflated responses key 'rows' item '0' key 'id' should be 'francis' # features/steps/response_steps.rb:44
  48. And the inflated responses key 'rows' item '1' should be a kind of 'Chef::DataBagItem' # features/steps/response_steps.rb:40
  49. And the inflated responses key 'rows' item '1' key 'id' should be 'axl_rose' # features/steps/response_steps.rb:44
  50. And the inflated responses key 'start' should be the integer '0' # features/steps/response_steps.rb:9
  51. And the inflated responses key 'total' should be the integer '2' # features/steps/response_steps.rb:9
  52.  
  53. Scenario: Search for objects with a manual ascending sort order # features/api/search/show_search.feature:43
  54. Given a 'registration' named 'bobo' exists # features/steps/fixture_steps.rb:162
  55. And a 'data_bag' named 'users' exists # features/steps/fixture_steps.rb:162
  56. And a 'data_bag_item' named 'francis' exists # features/steps/fixture_steps.rb:162
  57. And a 'data_bag_item' named 'axl_rose' exists # features/steps/fixture_steps.rb:162
  58. And I wait for '10' seconds # features/steps/fixture_steps.rb:212
  59. When I authenticate as 'bobo' # features/steps/request_steps.rb:53
  60. And I 'GET' the path '/search/users?sort=id+asc' # features/steps/request_steps.rb:1
  61. /usr/local/lib/ruby/gems/1.8/gems/rspec-1.2.9/lib/spec/matchers/matcher.rb:17: warning: multiple values for a block parameter (0 for 1)
  62. from /usr/local/lib/ruby/gems/1.8/gems/rspec-1.2.9/lib/spec/matchers/matcher.rb:74
  63. Then the inflated responses key 'rows' item '0' should be a kind of 'Chef::DataBagItem' # features/steps/response_steps.rb:40
  64. expected nil to be a kind of Chef::DataBagItem (Spec::Expectations::ExpectationNotMetError)
  65. ./features/steps/response_steps.rb:41:in `/^the inflated responses key '(.+)' item '(\d+)' should be a kind of '(.+)'$/'
  66. features/api/search/show_search.feature:51:in `Then the inflated responses key 'rows' item '0' should be a kind of 'Chef::DataBagItem''
  67. And the inflated responses key 'rows' item '0' key 'id' should be 'axl_rose' # features/steps/response_steps.rb:44
  68. And the inflated responses key 'rows' item '1' should be a kind of 'Chef::DataBagItem' # features/steps/response_steps.rb:40
  69. And the inflated responses key 'rows' item '1' key 'id' should be 'francis' # features/steps/response_steps.rb:44
  70. And the inflated responses key 'start' should be the integer '0' # features/steps/response_steps.rb:9
  71. And the inflated responses key 'total' should be the integer '2' # features/steps/response_steps.rb:9
  72.  
  73. Scenario: Search for objects with a manual descending sort order # features/api/search/show_search.feature:58
  74. Given a 'registration' named 'bobo' exists # features/steps/fixture_steps.rb:162
  75. And a 'data_bag' named 'users' exists # features/steps/fixture_steps.rb:162
  76. And a 'data_bag_item' named 'francis' exists # features/steps/fixture_steps.rb:162
  77. And a 'data_bag_item' named 'axl_rose' exists # features/steps/fixture_steps.rb:162
  78. And I wait for '10' seconds # features/steps/fixture_steps.rb:212
  79. When I authenticate as 'bobo' # features/steps/request_steps.rb:53
  80. And I 'GET' the path '/search/users?sort=id+desc' # features/steps/request_steps.rb:1
  81. /usr/local/lib/ruby/gems/1.8/gems/rspec-1.2.9/lib/spec/matchers/matcher.rb:17: warning: multiple values for a block parameter (0 for 1)
  82. from /usr/local/lib/ruby/gems/1.8/gems/rspec-1.2.9/lib/spec/matchers/matcher.rb:74
  83. Then the inflated responses key 'rows' item '0' should be a kind of 'Chef::DataBagItem' # features/steps/response_steps.rb:40
  84. expected nil to be a kind of Chef::DataBagItem (Spec::Expectations::ExpectationNotMetError)
  85. ./features/steps/response_steps.rb:41:in `/^the inflated responses key '(.+)' item '(\d+)' should be a kind of '(.+)'$/'
  86. features/api/search/show_search.feature:66:in `Then the inflated responses key 'rows' item '0' should be a kind of 'Chef::DataBagItem''
  87. And the inflated responses key 'rows' item '0' key 'id' should be 'francis' # features/steps/response_steps.rb:44
  88. And the inflated responses key 'rows' item '1' should be a kind of 'Chef::DataBagItem' # features/steps/response_steps.rb:40
  89. And the inflated responses key 'rows' item '1' key 'id' should be 'axl_rose' # features/steps/response_steps.rb:44
  90. And the inflated responses key 'start' should be the integer '0' # features/steps/response_steps.rb:9
  91. And the inflated responses key 'total' should be the integer '2' # features/steps/response_steps.rb:9
  92.  
  93. Scenario: Search for objects and page through the results # features/api/search/show_search.feature:73
  94. Given a 'registration' named 'bobo' exists # features/steps/fixture_steps.rb:162
  95. And a 'data_bag' named 'users' exists # features/steps/fixture_steps.rb:162
  96. And a 'data_bag_item' named 'francis' exists # features/steps/fixture_steps.rb:162
  97. And a 'data_bag_item' named 'axl_rose' exists # features/steps/fixture_steps.rb:162
  98. And I wait for '10' seconds # features/steps/fixture_steps.rb:212
  99. When I authenticate as 'bobo' # features/steps/request_steps.rb:53
  100. And I 'GET' the path '/search/users?rows=1&sort=id+asc' # features/steps/request_steps.rb:1
  101. /usr/local/lib/ruby/gems/1.8/gems/rspec-1.2.9/lib/spec/matchers/matcher.rb:17: warning: multiple values for a block parameter (0 for 1)
  102. from /usr/local/lib/ruby/gems/1.8/gems/rspec-1.2.9/lib/spec/matchers/matcher.rb:74
  103. Then the inflated responses key 'rows' item '0' should be a kind of 'Chef::DataBagItem' # features/steps/response_steps.rb:40
  104. expected nil to be a kind of Chef::DataBagItem (Spec::Expectations::ExpectationNotMetError)
  105. ./features/steps/response_steps.rb:41:in `/^the inflated responses key '(.+)' item '(\d+)' should be a kind of '(.+)'$/'
  106. features/api/search/show_search.feature:81:in `Then the inflated responses key 'rows' item '0' should be a kind of 'Chef::DataBagItem''
  107. And the inflated responses key 'rows' item '0' key 'id' should be 'axl_rose' # features/steps/response_steps.rb:44
  108. And the inflated responses key 'rows' should be '1' items long # features/steps/response_steps.rb:48
  109. And the inflated responses key 'start' should be the integer '0' # features/steps/response_steps.rb:9
  110. And the inflated responses key 'total' should be the integer '2' # features/steps/response_steps.rb:9
  111. When I 'GET' the path '/search/users?rows=1&start=1&sort=id+asc' # features/steps/request_steps.rb:1
  112. Then the inflated responses key 'rows' item '0' should be a kind of 'Chef::DataBagItem' # features/steps/response_steps.rb:40
  113. And the inflated responses key 'rows' item '0' key 'id' should be 'francis' # features/steps/response_steps.rb:44
  114. And the inflated responses key 'rows' should be '1' items long # features/steps/response_steps.rb:48
  115. And the inflated responses key 'start' should be the integer '1' # features/steps/response_steps.rb:9
  116. And the inflated responses key 'total' should be the integer '2' # features/steps/response_steps.rb:9
  117.  
  118. Scenario: Search for a subset of objects # features/api/search/show_search.feature:93
  119. Given a 'registration' named 'bobo' exists # features/steps/fixture_steps.rb:162
  120. And a 'data_bag' named 'users' exists # features/steps/fixture_steps.rb:162
  121. And a 'data_bag_item' named 'francis' exists # features/steps/fixture_steps.rb:162
  122. And a 'data_bag_item' named 'axl_rose' exists # features/steps/fixture_steps.rb:162
  123. And I wait for '10' seconds # features/steps/fixture_steps.rb:212
  124. When I authenticate as 'bobo' # features/steps/request_steps.rb:53
  125. And I 'GET' the path '/search/users?q=id:axl_rose' # features/steps/request_steps.rb:1
  126. /usr/local/lib/ruby/gems/1.8/gems/rspec-1.2.9/lib/spec/matchers/matcher.rb:17: warning: multiple values for a block parameter (0 for 1)
  127. from /usr/local/lib/ruby/gems/1.8/gems/rspec-1.2.9/lib/spec/matchers/matcher.rb:74
  128. Then the inflated responses key 'rows' item '0' should be a kind of 'Chef::DataBagItem' # features/steps/response_steps.rb:40
  129. expected nil to be a kind of Chef::DataBagItem (Spec::Expectations::ExpectationNotMetError)
  130. ./features/steps/response_steps.rb:41:in `/^the inflated responses key '(.+)' item '(\d+)' should be a kind of '(.+)'$/'
  131. features/api/search/show_search.feature:101:in `Then the inflated responses key 'rows' item '0' should be a kind of 'Chef::DataBagItem''
  132. And the inflated responses key 'rows' item '0' key 'id' should be 'axl_rose' # features/steps/response_steps.rb:44
  133. And the inflated responses key 'start' should be the integer '0' # features/steps/response_steps.rb:9
  134. And the inflated responses key 'total' should be the integer '1' # features/steps/response_steps.rb:9
  135.  
  136. Scenario: Search for a node # features/api/search/show_search.feature:106
  137. Given a 'registration' named 'bobo' exists # features/steps/fixture_steps.rb:162
  138. And a 'node' named 'searchman' exists # features/steps/fixture_steps.rb:162
  139. And I wait for '10' seconds # features/steps/fixture_steps.rb:212
  140. When I authenticate as 'bobo' # features/steps/request_steps.rb:53
  141. And I 'GET' the path '/search/node?q=recipe:oracle' # features/steps/request_steps.rb:1
  142. /usr/local/lib/ruby/gems/1.8/gems/rspec-1.2.9/lib/spec/matchers/matcher.rb:17: warning: multiple values for a block parameter (0 for 1)
  143. from /usr/local/lib/ruby/gems/1.8/gems/rspec-1.2.9/lib/spec/matchers/matcher.rb:74
  144. Then the inflated responses key 'rows' item '0' should be a kind of 'Chef::Node' # features/steps/response_steps.rb:40
  145. expected nil to be a kind of Chef::Node (Spec::Expectations::ExpectationNotMetError)
  146. ./features/steps/response_steps.rb:41:in `/^the inflated responses key '(.+)' item '(\d+)' should be a kind of '(.+)'$/'
  147. features/api/search/show_search.feature:112:in `Then the inflated responses key 'rows' item '0' should be a kind of 'Chef::Node''
  148. And the inflated responses key 'rows' item '0' key 'one' should be 'five' # features/steps/response_steps.rb:44
  149. And the inflated responses key 'rows' item '0' key 'three' should be 'four' # features/steps/response_steps.rb:44
  150. And the inflated responses key 'rows' item '0' key 'walking' should be 'tall' # features/steps/response_steps.rb:44
Add Comment
Please, Sign In to add comment