Renamed keystone_registration to identity_registration, and added identity_registration tests. Added registration tests to simply test the args being passed to the `openstack_identity_register` LWRP. The identity LWRP should be tested at a deeper level than the consumers. Testing args passed to a DSL (&block) is a bit tricky. The tests are not ideal, but give us the necessary coverage to catch common errors. Fixes: Bug 1182574 Change-Id: I4794e555133852cfbacd407dc726c6b65ecdef65
		
			
				
	
	
		
			46 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			Ruby
		
	
	
	
	
	
			
		
		
	
	
			46 lines
		
	
	
		
			1.3 KiB
		
	
	
	
		
			Ruby
		
	
	
	
	
	
require "spec_helper"
 | 
						|
 | 
						|
describe "openstack-block-storage::volume" do
 | 
						|
  describe "redhat" do
 | 
						|
    before do
 | 
						|
      block_storage_stubs
 | 
						|
      @chef_run = ::ChefSpec::ChefRunner.new ::REDHAT_OPTS
 | 
						|
      @chef_run.converge "openstack-block-storage::volume"
 | 
						|
    end
 | 
						|
 | 
						|
    it "installs cinder volume packages" do
 | 
						|
      expect(@chef_run).to upgrade_package "openstack-cinder"
 | 
						|
      expect(@chef_run).to upgrade_package "MySQL-python"
 | 
						|
    end
 | 
						|
 | 
						|
    it "installs cinder iscsi packages" do
 | 
						|
      expect(@chef_run).to upgrade_package "scsi-target-utils"
 | 
						|
    end
 | 
						|
 | 
						|
    it "starts cinder volume" do
 | 
						|
      expect(@chef_run).to start_service "openstack-cinder-volume"
 | 
						|
    end
 | 
						|
 | 
						|
    it "starts cinder volume on boot" do
 | 
						|
      expected = "openstack-cinder-volume"
 | 
						|
      expect(@chef_run).to set_service_to_start_on_boot expected
 | 
						|
    end
 | 
						|
 | 
						|
    it "starts iscsi target on boot" do
 | 
						|
      expect(@chef_run).to set_service_to_start_on_boot "tgtd"
 | 
						|
    end
 | 
						|
 | 
						|
    it "has redhat include" do
 | 
						|
      file = "/etc/tgt/targets.conf"
 | 
						|
      expect(@chef_run).to create_file_with_content file,
 | 
						|
        "include /var/lib/cinder/volumes/*"
 | 
						|
      expect(@chef_run).not_to create_file_with_content file,
 | 
						|
        "include /etc/tgt/conf.d/*.conf"
 | 
						|
    end
 | 
						|
 | 
						|
    it "has different tgt" do
 | 
						|
      expect(@chef_run).to create_file_with_content "/etc/tgt/targets.conf", "/var/lib/cinder/volumes"
 | 
						|
    end
 | 
						|
  end
 | 
						|
end
 |