summaryrefslogtreecommitdiff
path: root/features
diff options
context:
space:
mode:
authorAdam Jacob <adam@opscode.com>2009-11-09 14:02:59 -0800
committerAdam Jacob <adam@opscode.com>2009-11-09 14:02:59 -0800
commit1cb1f4b1e548bfbcd99035ee2ddcab777c5c20d2 (patch)
treed34631747ec9e78db0b707d531ac5c7416496ace /features
parent2c47c70bf690fb39d5db1336b6735d24211a030a (diff)
downloadchef-1cb1f4b1e548bfbcd99035ee2ddcab777c5c20d2.tar.gz
Fixes CHEF-693
* Store override and default attributes in the node * Indexer for role and recipe works
Diffstat (limited to 'features')
-rw-r--r--features/api/search/show_search.feature11
-rw-r--r--features/steps/fixture_steps.rb9
2 files changed, 20 insertions, 0 deletions
diff --git a/features/api/search/show_search.feature b/features/api/search/show_search.feature
index 292d043b0d..c98adcf6af 100644
--- a/features/api/search/show_search.feature
+++ b/features/api/search/show_search.feature
@@ -103,6 +103,17 @@ Feature: Search data via the REST API
And the inflated responses key 'start' should be the integer '0'
And the inflated responses key 'total' should be the integer '1'
+ Scenario: Search for a node
+ Given a 'registration' named 'bobo' exists
+ And a 'node' named 'searchman' exists
+ And I wait for '10' seconds
+ When I authenticate as 'bobo'
+ And I 'GET' the path '/search/node?q=recipe:oracle'
+ Then the inflated responses key 'rows' item '0' should be a kind of 'Chef::Node'
+ And the inflated responses key 'rows' item '0' key 'one' should be 'five'
+ And the inflated responses key 'rows' item '0' key 'three' should be 'four'
+ And the inflated responses key 'rows' item '0' key 'walking' should be 'tall'
+
Scenario: Search for a type of object that does not exist
Given a 'registration' named 'bobo' exists
When I authenticate as 'bobo'
diff --git a/features/steps/fixture_steps.rb b/features/steps/fixture_steps.rb
index a9516a2a0f..b3ae543c8b 100644
--- a/features/steps/fixture_steps.rb
+++ b/features/steps/fixture_steps.rb
@@ -107,6 +107,15 @@ Before do
n.just "kidding - who uses oracle?"
n
end,
+ 'searchman' => Proc.new do
+ n = Chef::Node.new
+ n.name 'searchman'
+ n.run_list << "oracle"
+ n.default_attrs = { "one" => "two", "three" => "four" }
+ n.override_attrs = { "one" => "five" }
+ n.set["walking"] = "tall"
+ n
+ end,
'sync' => Proc.new do
n = Chef::Node.new
n.name 'sync'