]> git.donarmstrong.com Git - dsa-puppet.git/blobdiff - 3rdparty/modules/cinder/spec/defines/cinder_backend_quobyte_spec.rb
try again, with puppetforge modules, correctly included now
[dsa-puppet.git] / 3rdparty / modules / cinder / spec / defines / cinder_backend_quobyte_spec.rb
diff --git a/3rdparty/modules/cinder/spec/defines/cinder_backend_quobyte_spec.rb b/3rdparty/modules/cinder/spec/defines/cinder_backend_quobyte_spec.rb
new file mode 100644 (file)
index 0000000..a3499f2
--- /dev/null
@@ -0,0 +1,45 @@
+require 'spec_helper'
+
+describe 'cinder::backend::quobyte' do
+
+  shared_examples_for 'quobyte volume driver' do
+    let(:title) {'myquobyte'}
+
+    let :params do
+      {
+       :quobyte_volume_url      => 'quobyte://quobyte.cluster.example.com/volume-name',
+        :quobyte_qcow2_volumes   => false,
+        :quobyte_sparsed_volumes => true,
+      }
+    end
+
+    it 'configures quobyte volume driver' do
+      should contain_cinder_config('myquobyte/volume_driver').with_value(
+        'cinder.volume.drivers.quobyte.QuobyteDriver')
+      should contain_cinder_config('myquobyte/quobyte_volume_url').with_value(
+        'quobyte://quobyte.cluster.example.com/volume-name')
+      should contain_cinder_config('myquobyte/quobyte_qcow2_volumes').with_value(
+        false)
+      should contain_cinder_config('myquobyte/quobyte_sparsed_volumes').with_value(
+        true)
+    end
+
+  end
+
+  context 'on Debian platforms' do
+    let :facts do
+      { :osfamily => 'Debian' }
+    end
+
+    it_configures 'quobyte volume driver'
+  end
+
+  context 'on RedHat platforms' do
+    let :facts do
+      { :osfamily => 'RedHat' }
+    end
+
+    it_configures 'quobyte volume driver'
+  end
+
+end