fujin (owner)

Revisions

gist: 188293 Download_button fork
public
Public Clone URL: git://gist.github.com/188293.git
Embed All Files: show embed
green-lights #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
aj@AJ-Christensens-MacBook (branch: 0.7.11-lwrp) ~/Development/chef/chef$ spec -cfs spec/unit/client_spec.rb
 
Chef::Client initialize
- should create a new Chef::Client object
 
Chef::Client run
- should start the run clock timer
- should build the node
- should register for an openid
- should authenticate with the server
- should synchronize definitions from the server
- should synchronize recipes from the server
- should synchronize and load library files from the server
- should synchronise and provider files from the server
- should synchronise and resource files from the server
- should synchronize and load attribute files from the server
- should save the nodes state on the server (twice!)
- should converge the node to the proper state
- should set the cookbook_path
 
Chef::Client run_solo
- should start/stop the run timer
- should build the node
- should converge the node to the proper state
- should use the configured cookbook_path
 
Chef::Client build_node
- should set the name equal to the FQDN
- should set the name equal to the hostname if FQDN is not available
- should add any json attributes to the node
- should allow you to set recipes from the json attributes
- should allow you to set a run_list from the json attributes
- should not add duplicate recipes from the json attributes
- should set the tags attribute to an empty array if it is not already defined
- should not set the tags attribute to an empty array if it is already defined
 
Chef::Client register
- should log an appropriate debug message regarding registering an openid
- should fetch the registration based on safe_name from the chef server
- should load the secret from disk
- should cause chef to die fatally if the filecache cannot find the registration
 
Chef::Client run_ohai
- refresh the plugins if ohai has already been run
 
Finished in 22.706846 seconds
 
31 examples, 0 failures
 
Diff #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
diff --git a/chef/spec/unit/client_spec.rb b/chef/spec/unit/client_spec.rb
index 303306a..01b8bb7 100644
--- a/chef/spec/unit/client_spec.rb
+++ b/chef/spec/unit/client_spec.rb
@@ -32,6 +32,8 @@ describe Chef::Client, "run" do
       :register,
       :authenticate,
       :sync_library_files,
+ :sync_provider_files,
+ :sync_resource_files,
       :sync_attribute_files,
       :sync_definitions,
       :sync_recipes,
@@ -82,6 +84,16 @@ describe Chef::Client, "run" do
     @client.should_receive(:sync_library_files).and_return(true)
     @client.run
   end
+
+ it "should synchronise and provider files from the server" do
+ @client.should_receive(:sync_provider_files).and_return(true)
+ @client.run
+ end
+
+ it "should synchronise and resource files from the server" do
+ @client.should_receive(:sync_resource_files).and_return(true)
+ @client.run
+ end
   
   it "should synchronize and load attribute files from the server" do
     @client.should_receive(:sync_attribute_files).and_return(true)