 9ae54fc736
			
		
	
	9ae54fc736
	
	
	
		
			
			* Did not implement template testing ATM. Need to go through and add those. Hoping to get some help with that.
		
			
				
	
	
		
			25 lines
		
	
	
		
			585 B
		
	
	
	
		
			Ruby
		
	
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
		
			585 B
		
	
	
	
		
			Ruby
		
	
	
	
	
	
| require "spec_helper"
 | |
| 
 | |
| describe "cinder::db" do
 | |
|   it "installs mysql packages" do
 | |
|     @chef_run = converge
 | |
| 
 | |
|     expect(@chef_run).to include_recipe "mysql::client"
 | |
|     expect(@chef_run).to include_recipe "mysql::ruby"
 | |
|   end
 | |
| 
 | |
|   it "creates database and user" do
 | |
|     ::Chef::Recipe.any_instance.should_receive(:db_create_with_user).
 | |
|       with "volume", "cinder", "test-pass"
 | |
| 
 | |
|     converge
 | |
|   end
 | |
| 
 | |
|   def converge
 | |
|     ::Chef::Recipe.any_instance.stub(:db_password).with("cinder").
 | |
|       and_return "test-pass"
 | |
| 
 | |
|     ::ChefSpec::ChefRunner.new(::UBUNTU_OPTS).converge "cinder::db"
 | |
|   end
 | |
| end
 |