Class: TestImplicitSearchDB

Inherits:
Test::Unit::TestCase
  • Object
show all
Includes:
SearchDbTests, SearchNodeTests
Defined in:
lib/knife-solo/resources/patch_cookbooks/chef-solo-search/tests/test_search.rb

Instance Method Summary collapse

Methods included from SearchNodeTests

#test_list_nodes, #test_search_node_with_attr_filter, #test_search_node_with_narrow_filter, #test_search_node_with_wide_filter, #test_search_node_without_json_class

Methods included from SearchDbTests

#test_AND_condition, #test_NOT_condition, #test_OR_condition, #test_OR_group, #test_any_value, #test_any_value_lucene_range, #test_array_includes, #test_block_usage, #test_boolean, #test_check_escaped_chars, #test_empty_field_value, #test_general_lucene_range_fails, #test_get_all_but_speedy, #test_get_all_with_field, #test_get_all_without_field, #test_integer, #test_nested_fieldnames, #test_search_all, #test_search_exact_match, #test_wildcards

Instance Method Details

#search(*args, &block) ⇒ Object



224
225
226
227
228
229
230
# File 'lib/knife-solo/resources/patch_cookbooks/chef-solo-search/tests/test_search.rb', line 224

def search(*args, &block)
  # wrapper around creating a new Recipe instance and calling search on it
  node = Chef::Node.new()
  cookbooks = Chef::CookbookCollection.new()
  run_context = Chef::RunContext.new(node, cookbooks, nil)
  return Chef::Recipe.new("test_cookbook", "test_recipe", run_context).search(*args, &block)
end